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
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.