"Magnetism is one of the Six Fundamental Forces of the Universe, with the other five being Gravity, Duct Tape, Whining, Remote Control, and The Force That Pulls Dogs Toward The Groins Of Strangers."
- Dave Barry
More pages: 1 2
Clustered Shading
Tuesday, March 24, 2015 | Permalink

So, uhm, it's been a while since I last posted a demo here. I have valid excuses though. This whole kids situation sure makes a dent into your available time, and for the time that remains it sure has an impact on how much energy you have left at the end of the day. But it's a great joy too, so I'm not unhappy about it in any way. And the other thing is of course that I moved into a research position at work, which reduces my itch of doing so much research at home during my spare hours. But with that said, I recently ended up browsing into my site with another guy at work for reasons I don't remember, and the realization that it had been nearly three years since the last demo was a little too depressing for me. So I made it a priority to make another one, and now it's here.

So for this demo I'm poking around a little with Clustered Shading, but exploring an alternative implementation of the underlying principles. The main differences being world-space clustering, storing active lights as a bitfield, and going full forward shading instead of deferred. Well, except for the reference I'm comparing to.

Some useful shortcuts for the demo:
F5 - Clustered Shading
F6 - Visualize clusters
F7 - Classic Deferred Shading
F8 - Visualize stencil mask for Deferred Shading with MSAA

Enjoy!

Name

Comment

Enter the code below



Heady
Wednesday, March 25, 2015

Hi
Nice Demo, but i couldn't see stencil mask (no difference between F7 and F.
After setting MSAA to higher than "NONE" Stencil Mask was then visible.
I use a GF 660.

Childrens change life I have twins, I know what you mean...

Humus
Thursday, March 26, 2015

That's normal, because if there's no MSAA, then no pixels will be tagged as an MSAA edge pixel.

Nuninho1980
Saturday, March 28, 2015

1st demo DX11!
I got ~2910 fps (camera default) at 1024x768@8xAA running Win 8.1 x64 with i5-2500K@4.5GHz and new EVGA GTX 780 Ti Classified@OC version-stock

Michael
Saturday, March 28, 2015

What is the benefits doing the clustering in world-space ? Is it a better way to do ? I actually have a view-space implementation using compute shader to generate the light grid. Do you think deferred rendering will not be used anymore in the future and only forward will be used ?

Michael
Saturday, March 28, 2015

The icon of the demo is a DX10 icon, you should change it to a DX11 icon since it's a DX11 demo.

Michael
Saturday, March 28, 2015

Last question : I saw in App.cpp you do the clustered Light Assignment in CPU, why not do it in a compute shader to free the CPU of this task ?

I found a bug in the settings using F1, move the setting's window in the border of the application's window (top-left and bottom-left), you will see a white line on the whole screen.

Nuninho1980
Saturday, March 28, 2015

Your newer demo hasn't well optimized as almost rest your older demos because its don't use (almost) full GPU usage. Why??

Running Win 8.1 with my same specs (see my previous post)
-- ~2910 fps at 1024x768@8xAA - only ~70% GPU usage
-- ~1445 fps at 1920x1200@8xAA - only ~86% GPU usage

Nuninho1980
Saturday, March 28, 2015

"Fullscreen" is lower GPU usage than "windowed". lol

I got ~3650 fps at 1024x768@8xAA (windowed at desktop 1280x1024) - ~93% GPU usage

Notice: read my previous posts.

More pages: 1 2