Sign in to follow this  
elias4444

Soft shadows without a shader?

Recommended Posts

Is it possible to implement soft shadows (I'm current using shadow mapping, but would be open to other options) without using shaders?

Share this post


Link to post
Share on other sites
You can try setting the GL_MIN_FILTER and GL_MAG_FILTER to GL_LINEAR. According to the OpenGL spec
"If the value of TEXTURE MAG FILTER is not NEAREST, or the value of
TEXTURE MIN FILTER is not NEAREST or NEAREST MIPMAP NEAREST, then r
may be computed by comparing more than one depth texture value to the texture
R coordinate. The details of this are implementation-dependent, but r should be a
value in the range [0, 1] which is proportional to the number of comparison passes
or failures."
I've tried this on NVIDIA cards and it looks pretty good.

Share this post


Link to post
Share on other sites
I did try that (setting the min and max filters to GL_LINEAR) without any perceivable results, although I'm using an ATI card.

Robert: I need dynamic shadows unfortunately :(

Share this post


Link to post
Share on other sites
Quote:
Original post by elias4444
I did try that without any perceivable results, although I'm using an ATI card.

It only works on NVidia. On ATI you need a shader to emulate it.

There isn't much you can do in terms of realtime soft shadows without shaders. The simply linear interpolation of shadow mapping results mentioned by foobarbazqux comes to mind, but it's not very high quality and only works on NV. You can also try various jittering and accumulation systems, but these are slow and/or ugly.

I think you're pretty much stuck with precomputed lightmaps in your case.

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