[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shadow volumes

This is my first post on the linuxgames mailing list:)


> Note that depth test is enabled and writing to depth buffer is disabled
> -> glStencilFunc(GL_ALWAYS, 0x00, 0x00);
Your mask should be 0xff.


> 	That's about it. The initial test I'm doing is not using an alpha
> blended quad, just a simple "solid" one, I just want to see if the
> process is working, which, as you might have already guessed, is not :)
> Any clues on this? Am I doing this all wrong?

Note that to get correct volumes in all cases (i.e. also when  the volume
is clipped against the near plane) you should use the so called Carmack's
reverse - incr/decr on zfail, and draw if stencil == 0.

Hope this helps,
Tomek Rozen

> Thanks in advance,
> Miguel A. Osorio.
> ------------------------------------------------------------------------
> Bedzie padac....  >>> http://pogoda.interia.pl/

Uwielbiam, gdy mnie odwiedzasz... >>> http://link.interia.pl/f1663