Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

shadow2DProj question

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 fpsulli3   Members   

1439
Like
0Likes
Like

Posted 24 October 2013 - 06:30 PM

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.



#2 3TATUK2   Members   

714
Like
0Likes
Like

Posted 24 October 2013 - 07:42 PM

maybe your shadowmap resolution is too small?



#3 MJP   Moderators   

19402
Like
3Likes
Like

Posted 25 October 2013 - 01:56 AM

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.



#4 fpsulli3   Members   

1439
Like
0Likes
Like

Posted 26 October 2013 - 07:57 PM

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






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.