PDA

View Full Version : Shadow Mapping Approach



azcoder
01-11-2005, 03:05 PM
My current implementation of standard shadow mapping is similar to the nvidia demo. After rendering the lightview to a pbuffer, I use glCopyTexSubImage2D to copy the depth values of the pbuffer to a depth texture. Then I use ARB_Shadow and texgen for the shadow compare when rendering the shadow receivers. Overall everything works, but the glCopyTexSubImage2D call seems to take alot of time for a 1024x1024 depth map. I am also dissapointed by the pure black shadows. (No ARB_Shadow_Ambient on nvidia)

I was planning on implementing another version by:
1) using a shader to encode the depth in a standard rgba texture
2) and using ARB_Render_texture to avoid the copy
3) finally, using another custom shader to do the compare when rendering receivers, this time dimming the shadows instead of pure black.

I am just looking for any validation of this approach - will it work and perform faster.

Thanks for any advice, tips, feedback,etc.....
:)