negative values for material/light colors?

I want to know if its normal to use negative numbers for material/light colors, or if its like dividing by zero for the visuals.


Just tried. Panda seems to be quite happy with negative lights. That’s good because I was planning to use them myself to make some fancy magical effects, absorbing the light around.

The question is whether every GPU out there is designed to handle it. I’m sure there’s some GPU out there that will explode violently when you pass it negative values for the material or light colours.

In fact, we ran into such cases when we were developing Pirates of the Caribbean. The vast majority of GPU’s do handle it correctly, but a few older models display nonsense.


Okay, better avoid then.

What about values higher than 1.0? I want to apply a color scale on a node to give it an effect like it’s “frozen”.

The OpenGL specification specifies that the values are not clamped, so it’s probably supposed to work; but it’s not specifically stating that it should work. So again, your mileage may vary.