PDA

View Full Version : 2 questions about shadowmapping



tellaman
05-25-2003, 07:42 AM
q's follow:
1) are GL_SGIX_depth_texture and GL_SGIX_shadow extensions supported by ati cards? i've visited delphi3d registry and couldnt find any support for ati cards. if this is the case, what direction should i go? i mean, i dont want to use arb_shadow since i guess it's not widely supported yet
2) i know GL_DEPTH_COMPONENT is implementation-dependent, but how can i be sure it uses all of the 32 bits of my zbuffer, does it choose dynamically based on my pfd?

thanks for any help you can provide http://192.48.159.181/discussion_boards/ubb/smile.gif

Asgard
05-25-2003, 09:35 AM
Originally posted by tellaman:
1) are GL_SGIX_depth_texture and GL_SGIX_shadow extensions supported by ati cards?

AFAIK, no. But newer Radeons support the ARB versions of these extensions. I wouldn't use the old SGIX extensions anymore now that we have ARB extensions. Newer drivers for new hardware will not support the SGIX extensions (see the Radeon 9500/9700 drivers) but only the ARB extensions.


2) i know GL_DEPTH_COMPONENT is implementation-dependent, but how can i be sure it uses all of the 32 bits of my zbuffer, does it choose dynamically based on my pfd?

Use GL_DEPTH_COMPONENT32 as internal texture format.


[This message has been edited by Asgard (edited 05-25-2003).]

tellaman
05-25-2003, 10:42 AM
thanks so much
i argue you dont have an ati card, i know arb_shadow would be good, but what about old chips like 8500?

Asgard
05-25-2003, 11:36 AM
To my knowledge, a Radeon 8500 does not support hardware shadow mapping.

tellaman
05-25-2003, 02:03 PM
thanks again :>

Korval
05-25-2003, 04:37 PM
To my knowledge, a Radeon 8500 does not support hardware shadow mapping.

If you mean by that, that it has support for culling fragments based on comparing the depth buffer to a texture value (ARB_shadow, for example), yes, they don't have support for that.

However, they do have 100% of the support necessary for doing shadow mapping, in their per-fragment operations (ATi_fragment_shader). All you need to do is do all the required operations per-fragment, including the render-to-texture op (it no longer renders the depth, it renders a fragment-program-computed depth into the texture). Do the compare in the fragment shader. And it all still works.

Asgard
05-26-2003, 01:12 AM
Do the compare in the fragment shader. And it all still works.

If you do that it won't be the same what ARB_shadow does because you're performing the shadow comparison after texture filtering, which is not correct (unless you use only point filtering). The results of the comparison can be averaged by filtering but not the depth values.

Asgard
05-26-2003, 01:58 AM
I just realized that you can actually do percentage closer filtering with ATI fragment shaders. I think I even once read a presentation from ATI about it. So ignore my post above.