• Advertisement
Sign in to follow this  

how to create soft shdow from depth texture? (solved)

This topic is 4476 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

Hello, i created shadows using fbo. I project it using fragment shaders using shadow2DProj function. How can i create a soft shadow from this? [Edited by - fazekaim on October 22, 2005 4:16:57 PM]

Share this post


Link to post
Share on other sites
Advertisement
You could just run a blur filter over the fbo. I'm not familiar with fbo's but you could just use the imaging subset to run a convolution kernel over it. Another option is to do the blurring in your fragment shader by sampling the shadow texture over a few texels.

Share this post


Link to post
Share on other sites
> Another option is to do the blurring in your fragment shader by sampling the
> shadow texture over a few texels.

ohh, but how can i sample the texture over a fow texel? if i add an 2.0/texturesize to the x and z (my up vector is the y axis) coords nothing change.

Share this post


Link to post
Share on other sites
I think you should add: (2.0 / texturesize) * w, where w is the fourth component of your tex coord.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement