how to create soft shdow from depth texture? (solved)
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]
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.
> 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.
> 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.
I think you should add: (2.0 / texturesize) * w, where w is the fourth component of your tex coord.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement