Jump to content
  • Advertisement
Sign in to follow this  
lipsryme

Deferred lighting and forward rendered geometry

This topic is 1970 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

I'm using a deferred shading approach with a forward alpha blend pass afterwards for e.g. transparent objects.

Currently I'm doing it in this order:

 

1. Shadow Map

2. GBuffer

3. Deferred Lighting

4. Forward alpha blend geometry using their own lighting shader and so on

 

Ofc I'm now having a huge problem getting the correct lighting to my forward rendered geometry.

My biggest problem right now is that I'm calculating atmospheric scattering inside the deferred lighting shader, which gives me light color and diffuse ambient light which is completely missing afterwards in the forward shaded passes.

 

So with that said, is it possible to include the forward rendered stuff in the deferred lighting stage ? Or is there something else I could do ?

Edited by lipsryme

Share this post


Link to post
Share on other sites
Advertisement

One of the overkill solutions is deep deferred shading (e.g. deferred shading also alpha blend geometry), but I presume thats not what you're looking for.

 

What about doing those transparent objects in multi-pass nature (one pass for each light source affecting the object) and at last one computing atmospheric scattering for them (all passes blended additively). This can be quite complex though, especially when you have large transparent objects affected by lots of lights ...

Share this post


Link to post
Share on other sites

There's also inferred lighting (pdf, bl ogs), which is a modification of "light pre pass" aka "deferred lighting", which supports around 4 layers of transparent objects.

 

If you only need a single layer of transparency, then Ashaman has a similar idea that works with regular deferred shading.

Share this post


Link to post
Share on other sites

Sticking with a hybrid deferred/forward should be alright if you can implement a version of tile based culling ala: https://sites.google.com/site/takahiroharada/ (top slides)

 

or really any such "forward+" culling scheme. Cryengine 3 currently uses a hybrid renderer for both transparency and materials that require more than your standard g-buffer information, which is a nice balance. Point is you should be able to get a lot of lights working with forward/deferred if you really want too.

 

If you want deferred for other reasons, I know Epic has figured out how to do it, the highest end codepath for UE4 is all deferred. But I don't think they've said how they did it. Maybe it's just Humus's "Deep Deffered" and they said "We've got enough bandwidth and memory for it now, let's just go for it."

Share this post


Link to post
Share on other sites

If you want deferred for other reasons, I know Epic has figured out how to do it, the highest end codepath for UE4 is all deferred. But I don't think they've said how they did it. Maybe it's just Humus's "Deep Deffered" and they said "We've got enough bandwidth and memory for it now, let's just go for it."

 

Personally I bet it's that, or some similar scheme (half resolution for transparent objects and then some more clever upsampling, maybe a bit more clever solution). Honestly you don't need N deferred buffers, with just 2 it will still look good (and unless you will have some lots of transparent objects in a line, player won't notice ... and even then, only few of them does).

 

And I'd add one to my description, there is also technique tiled forward shading, which applies the idea of tiled deferred on forward - with quite good results http://www.pjblewis.com/articles/tile-based-forward-rendering/.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!