PDA

View Full Version : Shadowtextures and fragmentprogram.



Mazy
08-17-2003, 02:46 PM
Does anyone have a simple explanation of what i should compare with the depthmap.. i have everything in the right places, but i need to compare the textures depthvalue with something ( just in the ARB_shadow extension) but i just cant figure out what..

CatAtWork
08-17-2003, 04:26 PM
The depth value of the fragment the texture has been projected onto.

Mazy
08-17-2003, 09:20 PM
I also thought that, but that I cant get to work. And on a second thought, if I set the near/far planes different from the light and from the eye the values shouldn't line up, and as far as i know its not required to have them at the exact same distance

flo
08-18-2003, 02:52 AM
You must compare r/q (that is, z/w) with the value in the shadow-map. If the shadow-map value is equal or greater, you have light, else you are in shadow.

If needed, you must implement linear filtering for yourself. So you have to sample the shadow-map several time to get the same quality as when using the ARB_shadow extension. It's a shame that the specialized hardware support on the GeForceFX is wasted when implementing depth-map shadows based on fragment-programs.

Mazy
08-18-2003, 03:25 AM
but it should be re-implemented in GLSlang i guess, since it has a special texture fetch for shadowtextures.