Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lighting and Shadows


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 xerzi   Members   -  Reputation: 177

Like
0Likes
Like

Posted 07 September 2013 - 05:02 PM

Trying to implement some lighting and shadows but I'm not really sure what techniques to use. I've read about forward and deferred lighting but I don't know of any shadow techniques.

 

From what I know about deferred lighting, basically you render a bunch of buffers, normal, diffuse, etc... and combine them such that you apply lighting based on those buffers such that you don't need to perform per object per light rendering. So you can have many lights at some cost, such as having materials i believe is a bit tricky as everything is basically rendered at once using the same process.

 

Now for shadows in this case, I'd assume you'd have a shadow buffer in this case and simply apply it over the lighting one ? I haven't really found that many resources on dynamic shadows with the deferred lighting technique.

 

I think forward rendering is pretty easy to understand, just every light that affects an object you apply that light to it when you draw the object (some restrictions as to how many lights an object can have on it, this is dependent on how many free registers you have in your shader I believe).

 



Sponsor:

#2 taytay   Members   -  Reputation: 117

Like
0Likes
Like

Posted 08 September 2013 - 12:29 PM

In deferred lighting, you render all necessary information for lighting (normals, color, position of each pixels) to a separate buffer and then use these buffers to render for each light without actually re-drawing your scene. After that you add outputs of all light sources and build your final result.

 

I used shadow volumes with deferred lighting before. With shadow volumes, you basically find which pixels on screen are lighted by a light and which are not. With that information, while rendering your light to final buffer you disregard shadowed areas. I am not sure how it would with different shadow algorithms

 

Hope that helps.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS