Skip to content

Commit 873f1e9

Browse files
committed
fix(Renderer): Update gl viewport on zbuffer pass
1 parent 572e671 commit 873f1e9

File tree

1 file changed

+6
-0
lines changed
  • Sources/Rendering/OpenGL/Renderer

1 file changed

+6
-0
lines changed

Sources/Rendering/OpenGL/Renderer/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ function vtkOpenGLRenderer(publicAPI, model) {
6565
gl.depthMask(true);
6666
}
6767

68+
const ts = publicAPI.getTiledSizeAndOrigin();
69+
gl.enable(gl.SCISSOR_TEST);
70+
gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
71+
gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
72+
6873
gl.colorMask(true, true, true, true);
6974
gl.clear(clearMask);
7075

@@ -160,6 +165,7 @@ function vtkOpenGLRenderer(publicAPI, model) {
160165
const ts = publicAPI.getTiledSizeAndOrigin();
161166
gl.enable(gl.SCISSOR_TEST);
162167
gl.scissor(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
168+
gl.viewport(ts.lowerLeftU, ts.lowerLeftV, ts.usize, ts.vsize);
163169

164170
gl.clear(clearMask);
165171

0 commit comments

Comments
 (0)