Sign in to follow this  

Deferred shading questions.

This topic is 4377 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 have been looking into deferred shading (specifically the chapeter on the STALKER engine in GPU Gems 2) and have a question: Is it possible to implement deferred shading in a rendering engine where different portions of the environment are drawn using different modelview matricies? In my planet rendering engine I am drawing the starfield and solar system, the planet and the detail patch (that appears on the planet when the camera is close enough) at different scales. I apply the scales by scaling the vertex data up, and scaling the translation of the camera along the view vector. In a deferred shader this would mean that the rendered out coordinates of the pixels would be in different coordinate spaces. Has anybody got any ways around this problem? Thanks!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hello,

I don't think I really get the whole problem, but I am also using deferred shading for now in my engine, and I have a lot of different ways of rendering my scene. Details, portals, PVS systems, instanced data, ... The only thing you have to make sure is that your output data in the G-buffers are all in the same space after you have rendered your MRTs. I use world space, because I can use it for other PP effects as well, but perhaps view space would be better. You can off course also render G-buffers for one part of the scene, shade these, and then rerender G-buffers for other parts, and shade again to a final render target. Don't really see why you would need this though. If you still want to use alpha blended geometries, use a forward shader for this after you have rendered your deferred shaded scene. During my culling process I simply collect all my alpha blended geometries. Works fine. Will perhaps make a forward rendering system soon, to see the difference in performance and quality, but for now I am happy using a deferred renderer, although Microsft and ATI disaprove of it. "It doesn't scale enough" .. they say. But even on 1600x1200 I still get rather decent framerate on a 6800 or 7800.

If other people have experience using deferred shading pls tell me your opinions, and why perhaps why a deferred renderer would not be good enough, since I wanna be sure about this :)

Share this post


Link to post
Share on other sites
I don't know why anyone (esp ATI) would disapprove of deferred shading. It seems to me, from what I have read, that its pretty much the only way to apply alot of cutting edge techniques to the same high poly scene. Even using VBOs, its still not practical to retransform and rerun vertex shaders on all the geometry on every pass if your geometry is already pushing the card to its limit on just one.

Share this post


Link to post
Share on other sites
Well, there are actually two good reasons to not go with deferred rendering:
1) Memory costs. You may be able to run it fast enough on a 6800 at 1600x1200, but you're probably using almost 60MB of memory right there. On a lot of machines that's almost half of the video memory used!

2) Basically no AA. This is something that I tried to work with for quite awhile, and I even came up with a solution that basically replicates hardware AA, but that consumes even more memory and rendering time. I still haven't looked at SimmerD's semi-deferred rendering solution (partly because none of his screens have AA enabled *wink wink if you're reading this, SimmerD :grin:*) , but that seems to be the most practical solution, which requires re-rendering of models for each light. Oh, and I'm going to take a pre-emptive guess that you're going to suggest just doing an edge detect blur, but anybody who has played games with and without AA can tell you that that is simply a stupid idea.

So, basically, if you use semi-deferred rendering, you get to have material switching and some other calculations (e.g. normal mapping) done once at the cost of a significant portion of your memory budget.

Share this post


Link to post
Share on other sites

This topic is 4377 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.

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