Shadow Volume Errors

i’ve implemented the shadow volume algorithme after the good tutorial on gamasutra. now my problem is that while the algorithme works well on distance i get disturbing results if getting close to a model. if i am at medium distance the shadow is correct. if i get closer to the model the shadows start to ‘fade’ away or ‘pop’ up on the model. it looks to me like the z-buffer values used during shadowing and rendering are not the same.

for rendering the shadow volume and rendering i use an infinite matrix using this:
</font><blockquote><font size=“1” face=“Verdana, Arial”>code:</font><hr /><pre style=“font-size:x-small; font-family: monospace;”>decMatrix decMatrix::CreateProjectionInfinite(int width, int height, float fov, float fovRatio, float znear){
if( width<1

for some reason the post got cranked up and i can not edit it (i’m told i’m no administrator… how the ****? it’s my own post!). hence here the rest of the post

</font><blockquote><font size=“1” face=“Verdana, Arial”>code:</font><hr /><pre style=“font-size:x-small; font-family: monospace;”>decMatrix decMatrix::CreateProjectionInfinite(int width, int height, float fov, float fovRatio, float znear){
if( width<1

damn… something is wrong here… the post got cranked up again, and i can’t delete the post nor the topic.

please an admin delete this entire topic. it looks like i’m unable to post without the post getting cranked up.

sorry for inconveniece, it’s not my fault.

I couldn’t help but notice your pain. You can’t use C/C++ OR operators in the UBB code block. It’ll cut your post short and render you unregistered…

Have you tried experimenting with glPolygonOffset on different passes?

Hlz

P.S. You may also want to search the advanced forum.

how can i post the c++ code if not with the code tag?

and i can’t use glPolygonOffset as i am using vertex /fragement programs and as far as i know those are ignored if programs are enabled.

ehhhh??? RTFM :wink: you need some forum manual reading my friend…

some code in here  

hi :slight_smile:

i had the same problem posting code (see arbritary slicing of a volume… ),
it seamed to split it in the ‘if’ statement as well, more precisely it was the || (or). The only way i could get code up was to link to it externally, really annoying.

doesn’t really help though sorry :frowning:

dasraiser