![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Schazzwozzer |
I want to implement a pretty basic shader technique, using lighting/shading to select from a fixed set of colors. It’s similar to what is described in this StackExchange post, except that I would be selecting a final albedo color. Oh, and I should emphasize that this is for a spatial (3D) shader.
As I understand it, while I could do that specific calculation in the light processor function, that function only operates on one light at a time. There is no opportunity to grab the final, cumulative contribution of lighting in the fragment processor or otherwise, and so this simple color ramp technique would seem not to be possible.
It also seems that I can’t just work out my own custom lighting, because the fragment processor can’t access any lighting information at all. No light positions, directions, or attenuation.
So my question is: am I misunderstanding this, or overlooking something? If not, does anyone know of a workaround? Failing that, does anyone have any insight into whether or not this is likely to change? It seems like it would be a significant obstacle to stylized, non-PBR art styles.