Sign in to follow this  

multipass lighting.

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I was wondering about multiple light rendering with multiple passes (when amount of visible lights is varying). First idea was like this: 1. Find a list of visible objects and level geometry. (with octree and frustum culling) 2. Render everything with only ambient light on. 3. Find a list of point-lights affecting frustum. (ligts whose influence sphere intersect with frustum) 4. For each light - find visible objects and geometry (from list generated in point 1) and render them with additive blending (passing that light to the shader) Is this correct?? Is there a better solution? How this was done in Doom3 or FarCry ?? First I considered rendering multiple lights with a single advanced shader pass, but then I would have a hardcoded light amount for each object even there are not as many lights affecting that object or there are more lights..

Share this post


Link to post
Share on other sites
you are right but you are not considering shadows.some geometry can be partially visible from light's point of view.So the lighting is done per pixel not per object. So step 4 should be:
For each light - find visible or partially visible objects and geometry (from list generated in point 1) and render each pixel that is not in shadow with additive blending (passing that light to the shader).

Share this post


Link to post
Share on other sites

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this