Just to let you guys know, the demo for variance shadow maps that we showed at GDC is now available (executable and source) at http://www.punkuser.net/vsm/.
Enjoy!
Enjoy!
Hmm. I tried using mean and std deviation for shadow maps a few years ago but abandoned it due to lack of time. I'm looking forward to reading through your paper when I get the chance.AndyTX said:Just to let you guys know, the demo for variance shadow maps that we showed at GDC is now available (executable and source) at http://www.punkuser.net/vsm/.
Enjoy!
(I'm assuming that FX16 is shorthand for fixed-point 16-bit... I could be wrong.)fellix said:Hmm, the FX16 map definitely lacks precision for correct blur filtering, but FP16 is running out of range and just like PCF it hardly covers the narrow occluded surfaces.
FP32 is about 30% slower here than FP16.
Oh yeah? Well you were on the right track as it turns out that moments *are* the representation that filters linearly.Simon F said:Hmm. I tried using mean and std deviation for shadow maps a few years ago but abandoned it due to lack of time. I'm looking forward to reading through your paper when I get the chance.
Yeah it shouldn't be too hard to work out the few remaining artifacts - we have some ideas, just haven't had the time. I'm also convinced that this is the way to go...DudeMeister said:imho, this is the future of shadowing, well unless the IHVs deliever a hardware filter like AF just for shadow maps
Yeah that's a bit misleading - as I mention in the README, I couldn't get derivative biasing to work consistently on both NVIDIA and ATI, so I just disabled it for now. PCF should produce effectively the same shadows as VSM, except that it is far more expensive and thus is clamped to relatively small filter kernels (ex. 5x5).Bludd said:though it seems that only the variance maps have some kind of self shadowing or something (or whatever that effect is).
It also depends on the shadow map resolution obviously... you can pick anything from 64x64 to 2048x2048 IIRC.fellix said:Some shots of mine, without filtering:
Brief note: Filter kernels over 5x5 is overkill, at least for the given scene with a single or two spot lights at such a close range.
That's really odd... I'll have to check that. What card do you have? It's possible that fixed-point just isn't working correctly at all on NVIDIA (I've not tested it much... the idea is to use FP on NVIDIA and FX on ATI). If that's on ATI then I'll have to try and reproduce that.fellix said:Fixed-point format is obviously producing artifacts at low view angles and hi-res shadow maps:
1024*1024 max here!?AndyTX said:It also depends on the shadow map resolution obviously... you can pick anything from 64x64 to 2048x2048 IIRC.
6800GS (NV42), with the latest WHQL.AndyTX said:What card do you have?
Running across levels of filtering and/or shadow map resolution doesn't affect the artifacts for me.AndyTX said:Also the numeric artifacts in the fp16 shot (the first one) look odd... nothing like what I'm used to, and there shouldn't be that many of them... in fact they should be practically invisible without blurring.
Oh ok... in any case it's just a constant in the main program naturally. There are some limits of what are renderable in GL though - I don't recall what they are for each vendor.fellix said:1024*1024 max here!?
Should be just fine then, although as I mentioned, fp16 is the ideal VSM mode for NVIDIA.fellix said:6800GS (NV42), with the latest WHQL.
Huh, well I'm not sure then. I know that NVIDIA and ATI have different fp16 formats though, so I may have to retest on NVIDIA after a made a few changes for ATI. In any case, it is possible to eliminate those without much workfellix said:Running across levels of filtering and/or shadow map resolution doesn't affect the artifacts for me.
We actually use a 4xRGBA16 since 2xRGBA16 isn't currently renderable (at least in OpenGL) anyways. I honestly haven't done a lot of testing with fixed-point on NVIDIA though so it may not work as expected... that said, use fp16Zengar said:As far as I know nvidia doesn't support two-channel 16bit fixed-point textures natively
Nice job. Enjoyed looking through it.AndyTX said:Just to let you guys know, the demo for variance shadow maps that we showed at GDC is now available (executable and source) at http://www.punkuser.net/vsm/.
Enjoy!
AndyTX said:We actually use a 4xRGBA16 since 2xRGBA16 isn't currently renderable (at least in OpenGL) anyways. I honestly haven't done a lot of testing with fixed-point on NVIDIA though so it may not work as expected... that said, use fp16
Ooh wow, that's awesome, thanks for the link! Evil auto-substitution thoughZengar said: