Original Post
Hi all,
Currently I'm working on my renderer. I preferred using Forward Rendering Method.
Now the question comes: What can you recommend me about multiple lighting with shaders?
* Single pass, multiple lights: With this approach, I'll define 1 directional (only Sun), 4 point and 2 spot lights per pass. I'll genereate shadow map with only spot lights. If # of lights for a light type exceeds the limit, say, 7 point lights in a scene, calculation will be done for first 4 of'em, then in a second pass, calculation will be done for remaining 3. Sun lighting will be performed last. This one may be faster, I think; but more complex. Also, cannot be supperted on early GPUs due to register limits.
* Multiple pass, single light: With this approach, I define only 1 light model per pass. Calculation can be change according to light type. This one is simpler, but can cause a bandwith problem.1
* Any other approach ?
Thx in advance.
-R
PS: Don't recommend me to use Deferred Rendering, please. It's a hungry bandwith eater.
Currently I'm working on my renderer. I preferred using Forward Rendering Method.
Now the question comes: What can you recommend me about multiple lighting with shaders?
* Single pass, multiple lights: With this approach, I'll define 1 directional (only Sun), 4 point and 2 spot lights per pass. I'll genereate shadow map with only spot lights. If # of lights for a light type exceeds the limit, say, 7 point lights in a scene, calculation will be done for first 4 of'em, then in a second pass, calculation will be done for remaining 3. Sun lighting will be performed last. This one may be faster, I think; but more complex. Also, cannot be supperted on early GPUs due to register limits.
* Multiple pass, single light: With this approach, I define only 1 light model per pass. Calculation can be change according to light type. This one is simpler, but can cause a bandwith problem.1
* Any other approach ?
Thx in advance.
-R
PS: Don't recommend me to use Deferred Rendering, please. It's a hungry bandwith eater.