PDA

View Full Version : alpha values in smooth shading



yossi
04-02-2001, 12:46 AM
Simple question:
Are alpha values interpolated between alpha values of a polygon vertices as well as RGB values, across a polygon in smooth shading? It is not clear from the red book.
Many thanks,
Yossi

Bob
04-02-2001, 01:47 AM
If you would have spent the few minutes it takes to post a question here on trying it yourself instead, you would have got an answer much faster. But yes, it is interpolated in the same way.

Eric
04-02-2001, 01:50 AM
Originally posted by Bob:
If you would have spent the few minutes it takes to post a question here on trying it yourself instead, you would have got an answer much faster.


Bob, you sound angry ! http://www.opengl.org/discussion_boards/ubb/smile.gif

Actually, I have another comment: let's say that the alpha value is not interpolated and I do that:

glBegin(GL_LINE);
glColor4f(1,1,1,0);
glVertex3f(0,0,0);
glColor4f(1,1,1,1);
glVertex3f(1,0,0);
glEnd();

If the alpha is not interpolated, which alpha value is used for my line ???

Regards.

Eric

P.S.: do not take offense, yossi !!! I am just being silly...

yossi
04-02-2001, 02:19 AM
Hi Bob,
I did try it myself before posting this question. Just wanted a confirmation from the Gurus.
Anyway, thanks for your answer.
Yossi

Michael Steinberg
04-02-2001, 07:16 AM
Bob: You could have saved some work too if you just had written "yes"... ;-)

Bob
04-02-2001, 11:09 AM
Ok, I was not angry, I was not mean (or at least not meant to), I was in a hurry, thats all. So I apologise for any harm done http://www.opengl.org/discussion_boards/ubb/tongue.gif

MS: 1-0 to you I suppose...