Skip to main content
GameDev.net gamedev.net
🔒 Locked

BRDFs and Deferred Lighting

Started by allingm Feb 2, 2011 at 12:50 PM 1 replies 3.8k views
Original Post
allingm
allingm
I've been researching different ways to generate specular in a deferred lighting system. I've been pouring through different BRDFs online and in "Real-Time Rendering", and I've been learning quite a bit. I even found an article on the "Real-Time Rendering" blog that was useful: http://www.realtimerendering.com/blog/deferred-lighting-approaches/

The post helped a lot, but I don't see how I can make the lighting pass do one type of lighting and then have the material pass convert these into another BRDF. For example, how can I do Blinn-Phong lighting in the light pass and then convert that to Oren-Nayar or Beckmann in the material pass?

Professional games seem to get around it somehow, but I have a feeling it is all extreme hacks. For example Uncharted 2 has a sort of cloth rendering. To be honest I don't care about hacks too much, but like everybody else I would like to avoid them if possible. I would also like to mention that Crytek simply changed normals to simulate anisotropic materials in their paper/presentation "CryENGINE 3: reaching the speed of light".
MJP
MJP
I'm pretty sure Uncharted 2 just forward renders special-case materials that need a different BRDF, and I would guess a lot of games do the same. The STALKER devs used to do take the N dot L result and use it to look up into a texture to get the actual lighting response...I don't know if they still do it. Other than that (and the Crytek trick you mentioned) I don't know any other techniques commonly in use. You can always dynamically branch in the lighting shader or stencil out materials that use a different BRDF, but naturally there's some performance implications with those approaches.
wolf
wolf
Yep look-up textures can go a far way here. You can store many lighting equations in look-up textures and then index with N.L and N.H. I tried Cook-Torrance, Oren-Nayar, Ashikhmin-Shirley and Ward in the past. I still have those implementations lying around.
BTW: you might check out a Game Programming Gems 4 article for an implementation that would be quite flexible. Let's talk about this on Monday when we are all back in the office.




Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.