PDA

View Full Version : Fading out a line



07-08-2006, 06:45 PM
Hi,

Quick question. I've got a stippled line and am trying to make it so it fades out (so alpha is 1 at one end and 0 at the other). Is there a nice easy way of doing this?

TIA,
David

ScottManDeath
07-09-2006, 04:03 AM
Setting a different alpha value at each vertex?

07-09-2006, 12:16 PM
No that just seems to make the whole thing transparent (when one vertex A=1.0, the second A=0.0). Btw Im using (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) as by glBlend arguments.

ScottManDeath
07-09-2006, 02:54 PM
Do you have smooth shading enabled?

07-09-2006, 03:56 PM
Yep I do.

07-09-2006, 04:19 PM
Ah no I dont, I thought I'd done so but it wasn't in my code when I checked.

Thanks for the help!.