Replies: 2 comments 5 replies
-
I noticed this and asked the WebXR team about it back when I first implemented it, but now I can't remember the answer. Only that it was safe to ignore and difficult to remove. @klausw do you remember? Is there some reason WebXR throws warnings for offscreen rendering? |
Beta Was this translation helpful? Give feedback.
-
@elalish, I think you may have meant a different issue? There are some expected GL errors when ending an AR session, these are due to the trusted browser process owning the buffers used for cross-process image transport. When the session ends, the browser process deletes them, leaving the references used for asynchronous drawing via the Renderer process invalid. That would be hard to fix since we don't want to wait for a potentially-unresponsive Renderer process before cleaning up resources. See https://bugs.chromium.org/p/chromium/issues/detail?id=1100997 which mentions the shutdown issue (expected) along with a first-frame issue which was a bug and fixed. As for the drawBuffers error, that appears to be https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/drawBuffers where the Blink WebGL 2 implementation throws the error from this code location: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webgl/webgl2_rendering_context_base.cc;l=3725;drc=ba2e4cba569018f72e3e211dc5d5c4ae3f52ff62 If I'm reading it right, this code path happens when drawing to a framebuffer object, where the only legal values are GL_NONE and COLOR_ATTACHMENT[i]_EXT. Notably, GL_BACK is not valid here - the "draw to the back buffer" choice is only legal when drawing to the default framebuffer. Can you add logging to see what value is setting? One possible hypothesis is that it might be confused by the WebXR opaque framebuffer, is it trying to use GL_BACK with that? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Curious if anyone has any insight into the "invalid operation" gl warning that pops up (at least in Chrome) when doing the initial shadow render in AR. It doesn't seem to cause any issues, but I've seen it come up in other Three.js projects as well and don't have a good handle on what gl doesn't like about the render target when in XR mode.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions