-
Yet another problem with shadow volume rendering
Hello!
I have a new problem when i draw the shadow volumes. I get some artifacts. Here is a screenshot:
http://bekengine.periergoi.gr/Screen...olume_prob.JPG
and here is my source:
http://rafb.net/paste/results/7JGlti54.html
any idea what is going on?
thanks in advance.
-
Super Moderator
OpenGL Guru
Re: Yet another problem with shadow volume rendering
This looks like zbuffer variations on your illumination pass.
some things to try:
1) Enable texturing during the zbuffer fill pass, this will keep the paths similar and may produce the same depth value for the generated fragments. Try enabling blending too.
2) Use glPolygonOffset to apply depth separation between passes.
3) if using shaders use z invariance.
You shouldn't need all of these and 1 would be the least attractive option but the easiest solution. Your software should work on some hardware without any modifications.
-
Re: Yet another problem with shadow volume rendering
the stragne think is that in an other older version of my engine a do exactly the same stuff (but i have different pixel shaders) and it works perfectly! why is that?
what nay cause this problem?
thanks
-
Re: Yet another problem with shadow volume rendering
Vertex shaders doesn't generate the same position data as fixed function, unless the position-invariant option is used.
- GLSL: ftransform();
- ARB_vertex_program: OPTION ARB_position_invariant
Also, make sure that you draw the shadow volume and the "world" with the same primitives (triangles, strips).
-
Re: Yet another problem with shadow volume rendering
hey. I use this command in the ARB_vertex_program.
now the artifacts is less than before. but they still exist. If i try to render the depth pass using a vertex program? is it gonna work? i will try it. But thanks for making my understand what causes the problem!
-
Re: Yet another problem with shadow volume rendering
oh... finaly didnt need to use a simple vertex program...
the draw depth has rendering using glBegin(GL_POLYGON)
I make it glBegin(GL_TRIANGE STRIP) and everything is ok.
thanks guys!!!
-
Re: Yet another problem with shadow volume rendering
Can I ask why "Vertex shaders doesn't generate the same position data as fixed function, unless the position-invariant option is used"?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules