question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid Internal Format gl.DEPTH_STENCIL

See original GitHub issue

Safari WebGL2 context only

WebGL: INVALID_ENUM: renderbufferStorage: invalid internalformat

in WebGLTextures.js

_gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height );

Disabling the stencil buffer for shadows removes the symptoms, but I expect that is not the proper fix.

/ping @aardgoose /ping @gkjohnson

https://threejs.org/examples/webgl_shadowmap.html (EDIT: With #19927, this example is no longer an issue.)

Screen Shot 2020-07-25 at 5 03 18 PM

https://threejs.org/examples/webgl_clipping_stencil.html (EDIT: This is now working with Safari 14.)

Screen Shot 2020-07-25 at 5 38 42 PM

Three.js version
  • [ x ] Dev
  • [ x ] r118
Browser
  • [ x ] Safari - 13.1.2
OS
  • [ x ] macOS
  • [ x ] iOS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
gkjohnsoncommented, Nov 12, 2020

I just tested this in Safari 14 and the stencil clip planes example seems to work, now.

2reactions
Mugen87commented, Jul 27, 2020

How about revisiting this topic with Safari 14? I mean if the implementation will be a new one, does it makes sense to invest now time in this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

framebuffer - Webgl - Rendering depth to texture returns gl ...
WebGL returns a gl.INVALID_FRAMEBUFFER_OPERATION when calling getError after a call to gl.clea or to gl.drawElements. I assume something is ...
Read more >
Image Format - OpenGL Wiki - Khronos Group
There are three basic kinds of image formats: color, depth, and depth/stencil. Unless otherwise specified, all formats can be used for textures ...
Read more >
WebGL and Depth-Stencil Renderbuffers - Google Groups
Other format/attachment-point combos are invalid. ... It also doesn't help that GL and ES differ on sized format, internal format, format, and type...
Read more >
WebGLRenderingContext.renderbufferStorage() - Web APIs
A GLenum specifying the internal format of the renderbuffer. Possible values: gl.RGBA4 : 4 red bits, 4 green bits, 4 blue bits 4...
Read more >
src/libANGLE/ErrorStrings.h - angle/angle - Git at Google
MSG kBlitDepthOrStencilFormatMismatch = "Depth/stencil buffer format combination not ... MSG kInvalidInternalFormat = "Invalid internal format 0x%04X.";.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found