Google-apps
Hoofdmenu

Post a Comment On: C0DE517E

"Mythbusting: deferred rendering"

7 Comments -

1 – 7 of 7
Blogger MJP said...

I have to agree with you on point #3...there seems to be a disturbing trend of games foregoing any kind prebaked GI in favor of faking it with lots of deferred lights and nasty hacks like SSAO. I helped my coworker develop a GI baker in CUDA that uses PRT for real-time preview/light tweaking, and even with totally unoptimized code it can finish a complex scene in a few minutes on an older consumer-level GPU. It seems a lot of people just no longer want to deal with the complexity of researching, implementing, and maintaining such a system.

Also with regards to #6...you can't resolve an MSAA lighting buffer prior to sampling it in the final pass. It will cause artifacts for pixels where 1 or more triangles only cover a fraction of subsamples. During the final pass you also need to avoid sampling subsamples of the lighting pass buffer that don't "belong" to the triangle being rasterized, either by running the shader at per-sample frequency or by using SV_Coverage in D3D11.

January 24, 2011 at 11:13 AM

Blogger DEADC0DE said...

MJP: Is just that some people just go with the latest trend, they switch their brain off and not think that every new technique is a tool in your arsenal but it's still up to you to use the right tools in the right places.

January 24, 2011 at 11:18 AM

Blogger DEADC0DE said...

MJP: About #6 I agree that it's not really correct (at all) but I've seen that done and mhm I might be fuzzy on this but I think it does produce something reasonable.

January 24, 2011 at 11:21 AM

Anonymous Steve Marton said...

"So it's basically 6 32bit buffers versus 5, not such a huge difference."

Ummm... Can you go into detail on how you would lay out your buffers for light prepass?

As far as I can tell light prepass requires only one additional buffer - the light accumulation buffer - over forward rendering. Total is light buffer, final/normal buffer, depth buffer = 3 (or 4 if you need more light precision).

Since the normals/specpower are not needed after the light prepass, they can share the final buffer. Normals can be rendered into the final buffer, light buffer calculated, then normals overwritten in the final pass with the final color.

Also, light prepass avoids the annoyances associated with MRTs.

Why would anyone use deferred shading, again? :)

January 27, 2011 at 8:26 PM

Blogger DEADC0DE said...

Steve: you're not going far with an 8bit light buffer, you need at least 16 or two 8 bits (diffuse and specular), i've seen games shipping with two 16 bits... So that counts for two. Also i was reasoning about bandwidth so i did not count the fact that you can save memory by shring buffs, as that won't reduce bandwidth. And i wrote it clearly in the post i think. Also i can see still a few reasons to go deferred shading, it really depends on the kind of game you're doing and how are your lights vs geometry. A game for example with dense geometry and dunno, the need to do cool decals in the gbuffer will work way better with deferred shading. Also i don't love the fact that the specular is fundamentall wrong in deferred lighting bu i didn't stud in depth was kind of visual defects that leads to

January 27, 2011 at 11:42 PM

Anonymous @rompa69 said...

Wrt #4, deferred lighting has to perform another vertex transform pass that happens regardless of Hi-Z, which can be expensive especially if its not a simple ModelViewProj transform. However, an advantage on some platforms is the second (colour) pass can be predicated on the visibility result of the first (depth) pass if things are drawn in the correct order.

Clustered lighting is also pretty cool as it works equally well for forward or deferred passes, but it does have a significant CPU overhead with sorting and "bucketing" a large number of lights if done in view-space.

December 14, 2013 at 4:48 PM

Blogger Unknown said...

Great post and nice blog shared here.Its an beautiful Content. Keep up the good work admin and thanks for sharing this post.

Rahasia Menang Judi Online

May 14, 2020 at 11:52 PM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot