Sign in to follow this  
n3Xus

[DX10] Deferred rendering: storing material data in G-buffer

Recommended Posts

Hello, I was just reading the paper about deferred rendering in STALKER (click) since I'm trying to implement a material system for my deferred renderer. I'm no graphics guru so I didn't understand this part very good (copy/paste from that paper):
Quote:
To maintain the target frame rate, we limited ourselves to a material index into a light-response lookup table. After many experiments to find an optimal re-parameterization for this texture, we settled on the simplest and most intuitive way: indexing the volume texture by (N · L, N · H, material).
I really don't understand much of it: light-response lookup table - what exactly does this store? Do the N.L and N.H tex coords at which a pixel is sampled tell the material how to act (basicly a "graph" based on N.L and N.H) and the 'material' value switched between "graphs" (or blends them) or am I totaly of?

Share this post


Link to post
Share on other sites
Yeah, pretty much. Basically for each material, they come up with a 2D table that determines the resulting lighting factor from N dot H and N dot L. Then they store that 2D table in one of the slices of the volume texture. So basically it would be like a bunch of 2D graphs stacked on top of each other, with the material index determining which slice you use. Then once you have a slice, you use your N dot L and N dot H values to look up the resulting lighting value table.

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