Change the color of light as it passes through a translucent object

Not sure if it should work the way you describe. Panda does not have a physical software calculation of light rays, this is a rather capacious procedure. However, shaders do a good job of this. The problem is that a shader with real physically correct lighting obviously cannot do this in real time. Therefore, some tricks and pseudo-effects are used.

For example, this code. Tree-based Screen Space Reflections (HZB) Demo Full Code

However, do not confuse this with gaming PBR materials, the real physical calculation looks like this, this is what you want.

1 Like