Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


problem with multipass bleeding

This topic is 5447 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m sure someone out there amungst the heavens knowns the very simple and easy solution to this problem...I''m using multipass multitexturing to add some static shadows to project, to be more specific I''ve drawn a stone archway onto a wall with an overhang above. The stones for the arch were all drawn individually along with the wall above them, what i''m tring to do is add a shadow, across the top that drops just under the top of the arch...when I draw the shadow it does a nice job of following the curve of the arch but it bleeds horribly. I''ve tryed some of the suggestions I''ve found by searching through the forums, like Polygon Offset, reseting the z-buffer higher, adjusting the near/far clipping planes, the only one I''ve found that works is to turn off the depth test, but then my shadow comes out as a rectangle and no longer follows the arch. any suggestions?

Share this post

Link to post
Share on other sites
Set depthfunc to GL_LEQUAL.


If you use polygon offset, disable z-buffer writing,
when rendering the second pass.


[edited by - circuit on November 18, 2003 4:39:31 AM]

Share this post

Link to post
Share on other sites

Here are a few tips that i ran into, i am not sure if this will help.

First you have to have your depth buffer off or it will fail a depth test and not display (or it should anyway).

You a stencil buffer to make sure you are not causing double darkaning. Double darkaning is that each triangle in the shadow adds grey, but if there is more then one triangle showdowing a specific place then it will add grey twice. To avoid that set the stencil buffer to a value and only add grey if the stencil test passees. You get the idea.

The last thing and probobly the most important. You should check your shadow matrix, if its longer then it should be then chances are the shadow matrix is projecting the model the wrong way.

Later, Ben

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!