Quote:

Interestingly, in shaders, scalars can be subsituted for vectors in any case.. such that: float value=c1.rgb; is legal.. this is the easy way to get a monotone value from a color vector.. which is very useful in many shaders.



Interesting indeed. Does it take the average of the elements or the max(), or some other algorithm?