Sign in to follow this  
CDProp

shadow2DProj question

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this