Skip to content

Commit b17a561

Browse files
authored
WebGLTextures: Increase default precision for depth buffers with WebGL 2. (#26764)
* WebGLTextures: Increase default precision for depth buffers with WebGL 2. * Examples: Update screenshots. * Examples: Update screenshots. * Add webgl2_multisampled_renderbuffers to exception list.
1 parent 8193d58 commit b17a561

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed
Loading

src/renderers/webgl/WebGLTextures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
14031403

14041404
if ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {
14051405

1406-
let glInternalFormat = _gl.DEPTH_COMPONENT16;
1406+
let glInternalFormat = ( isWebGL2 === true ) ? _gl.DEPTH_COMPONENT24 : _gl.DEPTH_COMPONENT16;
14071407

14081408
if ( isMultisample || useMultisampledRTT( renderTarget ) ) {
14091409

test/e2e/puppeteer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ const exceptionList = [
9999
'webgl_test_memory2',
100100
'webgl_tiled_forward',
101101
'webgl2_volume_instancing',
102+
'webgl2_multisampled_renderbuffers',
102103
'webgl_points_dynamic',
103104

104105
// TODO: implement determinism for setTimeout and setInterval

0 commit comments

Comments
 (0)