-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
PlayCanvas' implementation of refraction doesn't behave correctly. When using attenuation, the entire object gets a bright, milky white look. This doesn't behave as users expect, or how refraction works in the real world, and it doesn't match how glTF renderers renders refraction. Compare these images:
| glTF Sample Viewer | PlayCanvas |
|---|---|
![]() |
![]() |
Notice especially the 0.25 and 0.5 columns, where the objects are much brighter than expected. It feels like the shader is wrong, and not energy conserving.
In fact, even just enabling attenuation with a white color (meaning no absorbtion), it immediately becomes milky. It doesn't matter what attenuation distance you set, as long as it's above 0.
| Attenuation distance 0 | Attenuation distance > 0 |
|---|---|
![]() |
![]() |
We need this fixed to be able to create accurate glass materials that render correctly.
Test project: https://playcanvas.com/project/1405372/overview/attenuation
glTF sample model & viewer: https://github.khronos.org/glTF-Assets/model/AttenuationTest
Renderer comparisons: https://github.khronos.org/glTF-Render-Fidelity/model/AttenuationTest



