Shadow Volume Flickering

Started by
12 comments, last by RPTD 18 years, 7 months ago
i'll try this one out once. one question though: what is SLT doing? don't remeber this command somehow.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Advertisement
i tried out your suggestion and received a strange result. on components (models made with a 3d app) do work with this and procude no more flickering. terrain patches though (single sided, non closed, grid-like patch) does still flicker like hell. now this makes no sense as no matter which of both i use both end up as a triangle-list which is then shadow-rendered (hence it should be the same for both).

*scratch head*... anyways... it is a beginning (50% works now *grin*). one problem though still stays. if i get very close to a model surface the shadow gets wrong, even without the z-fight-matrix applied. can you look once more at the matrix and the shaders? i see no reason why very near to the camera-plane this effect happens. if the model moves roughly 10m away from you the effect vanishes. seen something like this?

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

Quote:
one question though: what is SLT doing?


That's Set if Less Than -- it returns (ra < rb) ? 1.0 : 0.0.

Quote:
can you look once more at the matrix and the shaders?


I just noticed that the (3,3) and (4,3) entries of your projection matrix are negated (they should be e-1 and -1). Was there a reason for that? OpenGL won't be too happy without m.a43 = -1. It could be the source of your problems.
the negation has a reason. my coordinate system has x towards right, y towards up and z into the screen. to get the matrices from my coordinate system to work with opengl i multiplied in a scale matrix with (1,1,-1). that's where the negation comes from.

i already played around with the e-1 value in the matrix but no matter if with or without minus it did not get rid of the effect. it's also not a one-machine problem. i have the same problem on both my machines, one with Radeon 9700 and one with Radeon 9600. no nvidia box around with shader support to test.

Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine

This topic is closed to new replies.

Advertisement