engine
engine copied to clipboard
Possible issue with dynamic refraction
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:
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
WebGPU rendering in DISPLAYFORMAT_LDR_SRGB mode: