# 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.

## Recommended Posts

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 on other sites
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 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 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?

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5

• 9
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632940
• Total Posts
3009326
• ### Who's Online (See full list)

There are no registered users currently online

×