Nvidia released their presentations from GDC05.
http://developer.nvidia.com/object/gdc_2005_presentations.html
http://developer.nvidia.com/object/gdc_2005_presentations.html
Not with stencil-based shadowing.suryad said:Pardon my lack of knowledge, but aren't there a few engines that are implementing soft shadowing with quiet good framerates?
DemoCoder said:Yeah, but 8-14fps on a 6800 Ultra @ 640x480 on a super-simple scene doesn't convince me this is ready for real-time. On the other hand, supposedly they aren't using "early exit" so every pixel uses 256 samples.
Has to do with the shader used, but would require SM3-level hardware. One demo on nVidia's set that does soft shadowing with an early out improves performance by about 4x with the early out enabled.wireframe said:Is this lack of "early out" a hardware limitation or does it pertain to their particular code?
jlippo said:If you mean shadows that are slightly blurred, yes.
But i havent seen or heard of a game with shadows able to do proper umbra/penumbra.
AndrewM said:The thing to note with this demo is that the shadow penumbra gets sharper closer to the casting object.
Well, except shadow maps aren't good for everything.AndrewM said:Even still, a good engine would have a fall back for plain shadow maps, and uniform soft shadows.
DemoCoder said:Yeah, but 8-14fps on a 6800 Ultra @ 640x480 on a super-simple scene doesn't convince me this is ready for real-time.
Lol I was looking at thisflf said:That would be the clearly labeled AVI link?
AndrewM said:jlippo said:If you mean shadows that are slightly blurred, yes.
But i havent seen or heard of a game with shadows able to do proper umbra/penumbra.
The PCF shadow demo (shader?) isnt a true umbra/penumbra. It just adds in a penumbra.
With some optimisation this might work pretty well on a 6800(6600). Too many instructions for anything sub SM3.0, and cant be optimised for early out without SM3 afaics.
Even still, a good engine would have a fall back for plain shadow maps, and uniform soft shadows.
The thing to note with this demo is that the shadow penumbra gets sharper closer to the casting object.
RandyFernando said:Hello everyone,
Thanks for checking out the soft shadow demo and slides. The goal of the presentation (and the shader) was to give the community some ideas to think about with respect to generating more realistic soft shadows. Specifically, I wanted to show one way to address the challenging problem of producing penumbras that correctly harden and soften in accordance with perceptual cues.
I thought it would be useful to address a few of the common comments I've heard here and elsewhere:
This shader is completely fragment-shader bound, because it's doing 400 texture lookups at each pixel that has a penumbra. That's 144 samples for the blocker search and 256 samples for the filtering. It's pretty impressive that so many fetches are even possible at several fps! Taking such a large number of samples has a bunch of implications:
1. The scene's geometric complexity has very little to do with performance. Until you start to get a *really* complex scene that starts to tax the vertex processors, you won't see any slowdown from that.
2. An easy way to increase the frame rate significantly is to reduce the number of blocker search or filtering samples. In the code, simply set searchSamples and/or samples to lower numbers. Even 8 search samples and 8 filtering samples will give great results, as long as the resulting penumbras aren't too huge. In return, your frame rate will more than double. On the 6800 Ultra, I saw the frame rate jump from 10 fps to around 24 fps in the shader that's on the web. Not too bad… I really should have done that for the video clip, since you can't appreciate all the extra samples at that resolution anyway!
3. Texture masking (the effect of detailed and busy textures hiding artifacts) is also something that works very well with shadows. So, adding a busy texture like a stone floor would hide the banding that results from reducing the number of filtering samples without adding any kind of jittering or noise. Which means that in practice, you could have a pretty high frame rate by using visually complex textures (as is typical) and reducing the number of samples.
The algorithm is based on a standard shadow map, which means that the closest occluder to the light is stored at each texel in the map (as usual). Another thing to note is that the width of the penumbra depends not only on the receiver distance, but on the blocker distance as well, as described on slide 10 of my presentation. If you scale the penumbras based on just one factor, you'll get the wrong results in some cases.
As I mentioned in the slides, there are a number of quality and performance improvements I'm looking at now. Right now, the code simply replaces the usual shadow map fragment shader, which I think is quite convenient. Optimizations such as masking off the umbras and fully-lit regions are good, but require multiple passes and modification to the host application, and therefore would be a little harder for people to integrate and experiment with. I want to make sure the basic shader is as solid as possible before moving on to improvements that involve the host application.
BTW, I'll try to record a new higher-quality video next week, when our scan-converter hardware should be working again.
Best wishes,
Randy