Jump to content
  • Advertisement
Sign in to follow this  
Nudel

OpenGL Deferred Shading Advantages?

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

From what I've understood, one of the main advantages of deferred shading is, that it enables you to render complex geometry with a lot of lights without invoking a draw call for each light. This means, an objects vertex shader wont be called again for every light.
Is this still useful for newer Versions of OpenGL(and maybe DirectX) where it's possible to pass all lights in an array to the pixel shader?

Share this post


Link to post
Share on other sites
Advertisement
You're right about that. And it seems deferred rendering becomes more and more popular (even when it has some issues, especially with transparent rendering). You'll save a lot of geometry pushing when having multiple lights. Don't know how newer versions of DX or OpenGL work, but I guess that doesn't change a thing when it comes to lighting techniques.

But more important, the data you produce with Deferred rendering (textures with pixel diffuse/specular/position/depth/....custom ) can be used for quite a lot other (post) effects as well. Many techniques requier a depth buffer of the scene for example. But also the specular colors of pixels can be handy for bloom or pseudo G.I. techniques. So, you get these buffers as a bonus when doing Deferred rendering. I wrote some stuff about it on my blog. It's not too technical, but it shows some of the advantages, as well as the disadvantages.
http://tower22.blogspot.com/2010/11/from-deferred-to-inferred-part-uno.html

Cheers,
Rick

Share this post


Link to post
Share on other sites
It's true that one advantage of deferred rendering is that u can have a lot of lights, but thats only one of the to big things u gain if u decouple lighting from geometry complexity.

The other thing is that u have to calculate the very expansive lighting calculations for every visible pixels only once. When rendering a lot of geometry you will always have a lot of overdraw, so u want to hold this extra cost which isn't contributing to the final picture as low as possible.

So if u use old forward rendering with a big array of lights u would waste alot of render time calculating pixels which are overdraw later.

I think the future will be the new techniq DICE uses for Battle Field 3. They create a normal G-Buffer but calculate all the lighting in a Compute Shader, in which they have a grid layed over the screen and calculate which lights effect which cells and then procede with the lighting

http://download2-dev...1_DX11inBF3.pps

Share this post


Link to post
Share on other sites
When it comes to me, the main benefit is the separation of lighting and shading pass. Really helps dealing with shader combinatorial explosion.
However, the historical issues of deferred shading have not been yet solved - mostly antialiasing and transparency. To be completely honest, I think it was quite slow since the beginning...

Share this post


Link to post
Share on other sites
There's another benefit to Deferred Shading that is worth while thinking about; it lessens the load on the GPU considerably as you are only, ever lighting a single pixel once. On weaker hardware (such as integrated chipsets; think AMD, nVidia mobile stuff and any of the Intel "GPU" lines) that might have fair memory bandwidth but lack some real computational grunt, this could be a possible win.


The poster above mentioned that anti-aliasing can be an issue. Well, only if you choose not to or can't do it in post-processing. I think there might be a possible solution to the transparency "problem" that is remarkably straight forward. I'll have to find the time to try it out though, but I'm pretty sure it'll work.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!