I want to do my own custom lighting unroll loops but I can’t figure out how to do that. Is there any way to see how the TDLighting() function is defined or would anyone know the general technique for doing custom lighting? I can’t find a good way to switch between light types (distant, point, etc) with the TDLight structs we’re given.
Sorry, there isn’t any clean way to get this information right now. The shaders change pretty heavily based on the features being used (light types shadows etc). To determine which light type is being used, it’s a bit odd. But for non-spots, the coneLookupScaleBias field will be (0,0,0,0). For distant vs. point, the only thing right now is that that direction == position for the distance light.
Ah ok. I was hoping there would be a macro for loop unrolling lights or something we could use. I’ve seen in other GLSL frameworks that also have a single defining struct for every light that position w is 1 for punctual lights and 0 for distant lights. Thanks for replying.