• Advertisement
Sign in to follow this  

shadow2DProj question

This topic is 1550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

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
Sign in to follow this  

  • Advertisement