Shadows show through or flicker in later graphics cards
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.graphics only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... graphics Profile…
 Up
Shadows show through or flicker in later graphics cards         


Author: Noley Edge
Date: Jul 25, 2008 09:41

I am rendering shadows using depth stencil buffers and a shadow map.
I am using a floating point texture for the shadow map. The shadow
map size is 1024. On older video cards, or cards that have only 256MB
ram, everything works fine. However, when I try to render the shadows
to a newer card with more than 256MB, the shadows flicker and exhibit
something that looks like Z-fighting. I was able to cure this, by
explicitly disabling fixed function Z buffering in my pixel shader
(ZEnable = FALSE). But this then led to the shadows showing through
all objects, whether the occluder was in front of them or not. This
effect makes it look like objects who have a shadow cast on them, are
transparent! You can see shadows straight through them.

So, I either get nasty flickering, or objects that are transparent
with regard to shadows.
But in cards that are older and less advanced, it works perfect as
long as I comment out the ZENABLE = FALSE!? If ZEnable is left at
FALSE, then shadows show through objects in both types of graphics
cards.
GeForce 6800 GO Ultra(256MB) - works GeForce 8300 GS - flicker or
transparency
Show full article (3.10Kb)
1 Comment
Re: Shadows show through or flicker in later graphics cards         


Author: Jan Bruns
Date: Aug 28, 2008 23:40

First of all, the technique you're presenting here
doesn't use stencil-shadowing (that's the thing
with geometry of shadow casters beeing extruded in
light-direction to the frustrum's bounds, then even/odd
testing the number of shadow-surfaces actually drawn
behind the scene).

Also it looks like you're using the non-hw sccelerated
version of shadow maps (FP-Textures carrying depth,
instead of real hardware depth-buffers, moving the
depth-comparison and weighting step the the hardware).

So if you disable Z-testing, the outcome should
look like always when you disabkle z-testing, at least
without any respect to shadows.

Maybe you should first take a look at wich format
your shadow maps are really using (does it depend
on the cards used?).

Gruss

Jan Bruns

"Noley Edge" gmail.com> schrieb im Newsbeitrag news:bcceedb9-0277-4d50-935f-3f425c6fb4d6@i20g2000prf.googlegroups.com...
>I am rendering shadows using depth stencil buffers and a shadow map...
Show full article (4.12Kb)
no comments