Sign in to follow this  
Aqua Costa

[DirectX 10] Is this ok?

Recommended Posts

Aqua Costa    3691
Im just thinking about how to do deferred lighting, can you see if this is ok?
Thanks in advance.

1-Render geometry -- Storing normals and depth -- Rendering front-to-back.

2-Create lighting map -- New render target and depth-stencil buffer.

3-Render geometry again and now add the material textures, properties, etc -- Sort the objects by material, diffuse texture, etc so when I render them I dont make many render state changes, etc and use the depth-stencil buffer from the first geometry pass so I only draw each pixel one time...

Share this post


Link to post
Share on other sites
mind in a box    887
Yeah, this is almost how I did it in my engine. However, I'm not sure about this part:
- 2-Create lighting map -- New render target and depth-stencil buffer.

Why would you want to create a new depth buffer for rendering the lights?
Anyways, the rest seems to be like I do it.

If you are interested, I wrote a little sample demonstrating the LightPrePass. I could upload it tomorrow if you want to take a look. S
I only wrote it to get familiar with the technique, it isn't very well written for this reason.

Share this post


Link to post
Share on other sites

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