Tuesday, August 22, 2017

lighting - Is there a way to use an arbitrary number of lights in a fragment shader?


Is there a way to pass an arbitrary number of light locations (and colors) for the fragment shader, and loop over them in the shader?


If not, then how are multiple lights supposed to be simulated? For example with respect to diffuse directional lighting, you can't just pass a sum of the light weights for the shader.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...