shadow2DProj question

Started by
2 comments, last by CDProp 10 years, 5 months ago

Greetings,

I have some older shaders running on GLSL 1.2 in which I'm using the shadow2DProj function (which I understand is now deprecated). Is there a way to control how many samples it uses for its filtering, and how spread apart those samples are? Right now, the shadow that I'm seeing is slightly blurred on the edges, but the jaggies are still extremely obvious. Way more than what I'm used to.

Advertisement

maybe your shadowmap resolution is too small?

GPU's only support 2x2 bilinear PCF filtering. If you need a larger kernel, you'll have to implement it yourself by taking multiple samples. If hardware PCF is available it's possible to use multiple 2x2 samples to implement a wider filter kernel. The "OptimizedPCF" mode from my shadows sample does this, so you could use it as a reference if you go down that route.

Thanks very much, MJP. I think I will go down that route, in fact.

This topic is closed to new replies.

Advertisement