Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL2 Graphics device creation with stencil: false breaks depth scene grab #5664

Closed
heretique opened this issue Sep 22, 2023 · 0 comments · Fixed by #5994
Closed

WebGL2 Graphics device creation with stencil: false breaks depth scene grab #5664

heretique opened this issue Sep 22, 2023 · 0 comments · Fixed by #5994
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@heretique
Copy link
Contributor

Description

When WebGL2 device creation is done with stencil: false and post effects are enabled, depth scene grab starts failing as framebuffers don't match when doing WebglGraphicsDevice.copyRenderTarget.

This has been observed on Edge/Chrome and Firefox.
There are a lot more details in this forum thread (conclusion towards the end):
https://forum.playcanvas.com/t/depth-issues-when-enabling-a-post-process-effect/33024/20

Steps to Reproduce

  1. load Post Effects example
  2. add the line stencil: false to const gfxOptions at line 28
  3. open the dev console
  4. switch to WebGL2 as active device.
  5. Example breaks and notice warnings in the console: [.WebGL-0x104005b3400] GL_INVALID_OPERATION: Depth/stencil buffer format combination not allowed for blit.

Note

This can be reproduced with the Ground Fog example as well only on FIrefox without the need for post effects to be enabled, just follow the same steps and notice similar warnings in the console WebGL warning: blitFramebuffer: Depth buffer formats must match if selected. and the depth debug view is white.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants