Revival of Forward Rending?

Started by
33 comments, last by Hodgman 12 years ago
True, believable materials are something that can definitely be improved upon.

So, I guess it would highly depend on your polycount, amount of different materials you have, and how you store them. Someone smarter than I am, please present a test of the tradeoffs between such variables between pure forward tiled and deffered/forward tiled. Then someone even smarter than them create a deffered shading technique that allows easy usage of arbitrary bdrfs so we don't care anymore biggrin.png
Advertisement
I certainly don't think you need 1000 unique BRDFs, but I roll my eyes at anybody who tries to call a game with just 1 "next-gen". Especially if that BRDF amounts to a simple Phong equivalent.

Like I said, why would we particularly care with the upcoming consoles? I, personally, would rather throw ultra high poly meshes and render individual leaves and a hundred shadow mapped lights with ultra high radius's (radii?) than storing however many bdrfs someone might go crazy with. So far as I'm concerned the former will require less art asset creation AND make level designers and modelers happier.


Who cares if you have a million lights or a billion triangles if everything looks like plastic?


Then someone even smarter than them create a deffered shading technique that allows easy usage of arbitrary bdrfs so we don't care anymore biggrin.png


You don't need anyone to do it for you. Just stuff an ID in your G-Buffer indicating which BRDF to use, and make sure that your G-Buffer has all of the data you need. Then you can branch away. You can also play around with redistributing threads for better coherency, or doing the lighting in multiple passes to prevent the register count from exploding.

The major advantage that forward rendering has is that it can be easier to do multiple BRDF's, since you can restrict yourself to 1 BRDF per pixel shader and you don't need to have everything in a G-Buffer. There's also the possibility for better performance, since you may not have to branch in a forward renderer.
I'm only posting out of curiosity but isn't the title of the topic a bit bold? I had no idea forward rendering was even dead, I understand deferred shading can be of great advantage, but even in some of the best deferred systems forward rendering can still be of great use. Hybrids aside forward rendering when mixed with a pre-z-pass (read and to a tiny degree tested) is a viable alternative and offers many great advantages, ranging from memory and bandwidth saving, to diversity of shaders.

I'm only posting out of curiosity but isn't the title of the topic a bit bold? I had no idea forward rendering was even dead, I understand deferred shading can be of great advantage, but even in some of the best deferred systems forward rendering can still be of great use. Hybrids aside forward rendering when mixed with a pre-z-pass (read and to a tiny degree tested) is a viable alternative and offers many great advantages, ranging from memory and bandwidth saving, to diversity of shaders.


Deferred shading is just really, really in vogue right now and it ends up being one of those hobbyist engine bullet points. Plenty of modern games (Skyrim, MW3, Mass Effect 3 and basically any UE3 game for that matter) use forward shading, some to very great effect.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

I'm only posting out of curiosity but isn't the title of the topic a bit bold? I had no idea forward rendering was even dead, I understand deferred shading can be of great advantage, but even in some of the best deferred systems forward rendering can still be of great use. Hybrids aside forward rendering when mixed with a pre-z-pass (read and to a tiny degree tested) is a viable alternative and offers many great advantages, ranging from memory and bandwidth saving, to diversity of shaders.


Yes, the title was a gambit to help ensure this topic got some attention since it was something I was particularly interested in. Ever since S.T.A.L.K.E.R. made use of deferred shading, it and light pre-pass have increased in popularity steadily. It seems most "next-gen" engines are going deferred in some way or another. I'm not aware of the exact statistics, but if deferred hasn't already surpassed forward, then it probably soon will if things stay the same.

My title wasn't really so much a statement that forward was dead, but that maybe the growing trend of deferred might swing back around toward forward.
Deferred shading is just really, really in vogue right now and it ends up being one of those hobbyist engine bullet points. Plenty of modern games (Skyrim, MW3, Mass Effect 3 and basically any UE3 game for that matter) use forward shading, some to very great effect.
To kind-of expand on this with a rant of my own:

It isn't really as simple as forward vs deferred (so yes, forward techniques definitely didn't "die"). An engine that lists one or the other as a feature is missing the point (or it's customers are missing the point) -- different games need different rendering pipelines, so an engine must be a platform for developing rendering pipelines. There's a lot more details to a pipeline than at which point you evaluate your lighting functions.

To illustrate: "deferred shadow maps" was a popular technique before deferred shading -- where you use your ZPP to composite shadow maps into a screen-sized buffer. These "S-Buffers" were originally used in forward renderers, but can just as well be used in a deferred renderer, where it can become a part of the G-buffer.
So traditionally, this looks like:
Forward:
[font=courier new,courier,monospace]ZPP [/font](models) -> [font=courier new]S-Buffer[/font] (lights) -> [font=courier new,courier,monospace]forward shading[/font] (models*lights/lightsPerPass)
Deferred:
[font=courier new,courier,monospace]G-Buffer[/font] (models) -> [font=courier new,courier,monospace]S-Buffer[/font] (lights) -> [font=courier new,courier,monospace]deferred shading[/font] (lights)

But using MRT (tech behind deferred) I can also re-arrange forward to remove the ZPP requirement. By outputting each light's diffuse+specular to a different render-target (and treating ambience as another light/render-target), then shadowing can be applied after forward shading (i.e. shade all pixels as non-shadowed, then correctly darken pixels to the right levels after the fact). I'll call the forward-render pass's output the [font=courier new,courier,monospace]f-buffer[/font], which gives:
[font=courier new,courier,monospace]forward shading[/font] (models*lights/lightsPerPass) -> [font=courier new,courier,monospace]S-Buffer[/font] (lights) -> [font=courier new,courier,monospace]combine[/font] ([font=courier new,courier,monospace]final = fbuffer[0..lights] * sbuffer[0..lights] + ambient[/font])

Now what is this? It's a renderer that uses MRT to output forward-shaded pixels to a fat buffer typical of a deferred renderer... and defers it's shadow map filtering, but without the typical ZPP prerequisite... If your light count is low enough, and/or you're ok with some chroma artefacts you could even do this without MRT, and with only a single model rendering pass.
Is it a forward renderer? It makes use of forward shading... Is it a deferred renderer? It defers a lot of rendering calculations using fat buffers...
It's these kind of situation-specific, frankenstein hybrids that you're likely to see behind most games. The "right pipeline" really, really does depend on the game.

This topic is closed to new replies.

Advertisement