Shadow mapping w/out GL_ARB_shadow

How do you compare the depth values in the depth texture with the current incoming z value? I’m using a Radeon 9000 Mobility, and it doesn’t support GL_ARB_shadow, but I can run Nvidia’s shadowmapping demo. Except that I cannot seem to find the GL calls to compare the z values. Could someone point me in the right direction?

Your card most likely supports GL_SGIX_shadow which is an “equivalent” of GL_ARB_shadow. I don’t use ATI cards but I’d guess that you may have old drivers. If you update then you may find that your card does support GL_ARB_shadow.

Nah, I looked it up on ATi’s site and they list every extension and which ones are supported by which cards, and my Radeon 9000 doesn’t support GL_ARB_shadow or the SGIX one. Of course, I can’t update my drivers because I have a laptop with the Radeon 9000 and every time I donwnload the new drivers it says it can’t find an equiavelant driver.

Anyone know how to get passed this issue with upgrading laptop display drivers for ATI cards?

You are probably looking at dual texture shadow mapping, introduced by Wolfgang Heidrich in 1999 in his PhD thesis. It doesn’t need specific shadow mapping extensions, and you can look it up in his thesis or on NVidia’s developer website (http://developer.nvidia.com/object/ogl_shadowmap.html).

Michael

http://mirror.ati.com/developer/samples/shadowmap.html

this demo is for directX, but it still demostrates how to do HW-shadowmapping on your ATI9000 card.(you’ll have to use ATI_fragemnt_program for a openGL version)

EDIT: the correct name of the extension is ATI_fragment_shader.

[This message has been edited by AdrianD (edited 09-21-2003).]

Radeons < 9500 do not support depth compare necessary for the SGIX-style shadow maps. Boo-hoo!

Instead, you can do ID based shadow mapping. Render each triangle (or each mesh component) in a specific color, and set up the fragment shader to compare the calculated color for a pixel with the ID buffer for that pixel; if the same, it’s lit; else not.

Radeons < 9500 do not support depth compare necessary for the SGIX-style shadow maps. Boo-hoo!

As long as you can texture fetch, and do a compare, you can do shadow mapping. You can still build it out of ATI_fragment_shader.

The NVidia demo has a code path that uses a linear alpha ramp to simulate depths: an 1D-alpha texture with a linear rise from 0 to 1 is bound and texture generation is used such that the near clipping plane has an alpha value of 0, the far clipping plane of 1. Then the resulting alpha texture is used as a depth map; the alpha(depth) comparison can be simulated with texenv and alpha test.

I think this is the rendering path that is used on the radeon 9000. Of course you only get 256 different depth values because alpha is only 8 bit.