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

Possible issue with dynamic refraction #6839

Open
mvaligursky opened this issue Jul 22, 2024 · 0 comments
Open

Possible issue with dynamic refraction #6839

mvaligursky opened this issue Jul 22, 2024 · 0 comments
Labels
area: graphics Graphics related issue bug

Comments

@mvaligursky
Copy link
Contributor

This can be reproduced in the dispersion example on WebGPU. When DISPLAYFORMAT_LDR_SRGB displaFormat is used, the prisms rendered with the dynamic reflection are darker than they are on WebGL. The reason is unclear at this stage, but some observations were made:

  • if in evalRefractionColor function of refractionDynamic.js chunk, refraction is converted from linear to gamma space, this works as on WebGL. But as this should all work in linear space, it suggests there is a bug / workaround elsewhere in WebGL code perhaps, or some other issue is causing this.
  • the test GLB contains this:
Screenshot 2024-07-22 at 17 26 37

and from a quick check, this should affect the refracted colors. Perhaps the issue is related to this somehow, but it's worth noting that all other webgl based glb viewers render it the same way as our WebGL implementation.

WebGL rendering
Screenshot 2024-07-22 at 16 55 34

WebGPU rendering in DISPLAYFORMAT_LDR_SRGB mode:
image

@mvaligursky mvaligursky added bug area: graphics Graphics related issue labels Jul 22, 2024
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
1 participant