Jump to content
  • Advertisement
Sign in to follow this  
Kethor

OpenGL Problem with gradient triangles

This topic is 3650 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've been working on soft shadows in OpenGL, however I got problem with gradients: Shadows:
http://i38.tinypic.com/155i1vk.jpg
you can notice on above image the lines on each edge Method of drawing (triangles):
http://images.gamedev.net/features/programming/2dsoftshadow/03HullGeneration.gif
My question is: Is there any method to fix this or any work-around (I'm talking about lines one each edge)? p.s. you might notice the shadows are just black & white. This is because I haven't added blend mode to it. Don't worry about that :) ~Keth

Share this post


Link to post
Share on other sites
Advertisement
You could extend two (or more) lines per shadowed vertex in order to tessalate your shadow hull more, which would reduce the visible discontinuities.

However generally you probably don't need to do this - by the time you've added blending so the surface textures show through it won't be visible. More so when you've got ambient light and multiple light sources.

Share this post


Link to post
Share on other sites
http://i33.tinypic.com/2rr4ec1.jpg
Not really, you can still notice it with blend mode added (especially on the left side). I tried ALL combinations of blend modes even combining them (15*15 = 225 combinations) however, none of them are correct.
However, extending the shadow and adding another vector point would slow down a lot. I really care about the speed.

p.s. I will be adding penumbra as soon as I will finish this part.

Edit: Oh, you are OrangyTang! Awesome article man. :)
Edit2: You are right about blending, however on the picture in this post it's caused because of the static shadow length. I will think about changing the method.

[Edited by - Kethor on October 12, 2008 7:51:39 PM]

Share this post


Link to post
Share on other sites
OrangyTang, could you please explain a bit more what you mean by saying "extend two (or more) lines per shadowed vertex"?

Do you mean something like this?
http://i33.tinypic.com/5b3gb4.jpg


If yes then there is another trouble with that:
http://i33.tinypic.com/15cgcue.jpg


Anyone else having any idea about that?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!