Skip to content

Commit 1805ecd

Browse files
authored
WebGLBackend: Fix depth regression. (mrdoob#30527)
1 parent 27a593b commit 1805ecd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/renderers/webgl-fallback/WebGLBackend.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ class WebGLBackend extends Backend {
212212
const parameters = this.parameters;
213213

214214
const contextAttributes = {
215-
antialias: false, // MSAA is applied via a custom renderbuffer
215+
antialias: renderer.samples > 0,
216216
alpha: true, // always true for performance reasons
217-
depth: false, // depth and stencil are set to false since the engine always renders into a framebuffer target first
218-
stencil: false
217+
depth: renderer.depth,
218+
stencil: renderer.stencil
219219
};
220220

221221
const glContext = ( parameters.context !== undefined ) ? parameters.context : renderer.domElement.getContext( 'webgl2', contextAttributes );

0 commit comments

Comments
 (0)