Deferred shading with multisampling demo

Humus

Crazy coder
Veteran
It's demo time again! :yes:

DeferredShading2.jpg


It's another deferred shading demo, but this time with multisample support. I'm using a stencil mask to separate edge pixels from interior pixels so that I only need to compute the lighting for all samples on edge pixel, and I can use a single sample for most pixels, much like multisampling using traditional forward shading.

F5 - Default mode 2 pass mode
F6 - Evaluate all samples always (essentially supersampling)
F7 - Evaluate a single sample always (resulting in no antialiasing)
F8 - Visualize the stencil mask

http://www.humus.name/
 
Awesome, I have been meaning to play with this sort of thing, but alas you beat me too it with a full demo even :). Multi-frequency shading is cool, and deferred shading is also awesome.

Cheers!
 
Sounds like a sweet demo. :)

Wouldn't similar thing be possible by rendering different lights to different sets of sub-samples?
There wouldn't be evaluation of edges, but it should work decently.
 
pressing F5, F6, F7 didn't bring any visible differences
also, F8 gives a blank window

using vista 32 bits, radeon 4850, latest catalyst drivers
 
Wouldn't similar thing be possible by rendering different lights to different sets of sub-samples?
There wouldn't be evaluation of edges, but it should work decently.

What would the advantage of rendering different lights to different samples be?

pressing F5, F6, F7 didn't bring any visible differences
also, F8 gives a blank window

using vista 32 bits, radeon 4850, latest catalyst drivers

Press F1 and select a multisampled mode if you haven't done so.
 
What would the advantage of rendering different lights to different samples be?
In quality I'm certain that you method does better job, but it might be faster to just not to evaluate the edges and do the work for each set of different subsamples.
MSAA would blend the results together anyway.

Altough something like non-interleaved rendering might be way to go when trying to do multi-frequency stuff.
 
In quality I'm certain that you method does better job, but it might be faster to just not to evaluate the edges and do the work for each set of different subsamples.
This is AFAIK exactly what Killzone 2 does on PS3.
 
In quality I'm certain that you method does better job, but it might be faster to just not to evaluate the edges and do the work for each set of different subsamples.
MSAA would blend the results together anyway.

Altough something like non-interleaved rendering might be way to go when trying to do multi-frequency stuff.

Very interesting paper. :)
Although, it addresses a different (but somewhat related) problem. The whole point of my demo was to make antialiasing work for deferred rendering. If you use the samples for different lights that wouldn't be compatible with antialiasing. But for other low-frequency stuff, like secondary lights in their case, it could be very useful. For things like fillrate bound particles systems it could also be very beneficial.

This is AFAIK exactly what Killzone 2 does on PS3.

According to their paper they evaluate lighting for both MSAA samples and average. They did a cool trick with shadows though by using different samples offsets for the two evaluations. So they effectively got twice the number of shadow samples on non-edge pixels. The cost is constant, but edge pixels would get half the quality, but that's something I would imagine you wouldn't notice even if you looked for it.
 
Back
Top