PDA

View Full Version : problem in planar shadow



Pswin
02-18-2008, 06:32 AM
i have a little problem with planar shadow when i use blending. when i use blendig some spots shown in the shadow, how can i remove this spots?!

problem shown at this shot:
http://psware.persiangig.com/e/KGE_test/shadow.PNG


and this is my code for blending:

glEnable(GL_EXT_blend_color);
glBlendColor(0.5,0.5,0.5,0.5);
glBlendFunc(GL_CONSTANT_ALPHA,GL_ONE_MINUS_CONSTAN T_COLOR );


( i must use blend-color)

Komat
02-18-2008, 02:20 PM
You can use stencil buffer to prevent the rendering from updating one pixel multiple times. See this paper (http://developer.nvidia.com/object/Stencil_Buffer_Tutorial.html) for details.