Best way to pass lights to a shader?
I want to have multiple dynamic lights (i.e., position changing every frame) in my scene that I will iterate over with a loop in my fragment shader, but I'm unsure of the best way to get this information to the card. Is it better from a performance point of view to put the light data into uniforms, or packed into a texture, or does it not really matter one way or the other?
My engine isn't deferred or anything, it's just a plain vanilla forward renderer.
when using >3.0 binding a buffer to a texture would be the best way
also possible with the gpu 4 extention
also possible with the gpu 4 extention
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement