Gourad Interpolation of Alpha channel ??!

My friend just asked me this. He has a triangle and distinct color at each vertices.
Now I know, if we specify color at each vertex, openGL does a gourad interpolation and fills the whole triangle accordingly. He also has a transparency value at each vertex. Now how is it possible to render the triangle using the transparency values at each vertex such that at any point inside the triangle the transparency is based on the three values like it does with the color. I am wondering, if we specify RGBA in the color field for each vertex, would openGL interpolate the alpha channel too ??
Or do I find out the Alpha at any point using barycentric co-ordinates but then how do I tell openGL to do the blend in absence of a texture ???

[This message has been edited by bivasb (edited 04-09-2001).]

Well, I have thinked about that before. With a quick test app in OpenGL, the answer is yes, it does interpolate the alpha channel.

OpenGL interpolates pretty much all vertex attributes. RGBA, texture coords, fog coord, secondary color (also RGBA), and vertex weights. The only exception I can think of are normals (and they’re not used on a per-fragment basis anyway).

  • Tom

I’m not 100% positive about this, but I thought there were some older cards which do NOT interpolate the alpha between verticies. I’ll see if I can dig up any info on this (or maybe someone else with the info will jump in for me).

You have to go back to the RIVA 128 generation before you see that kind of problem.

  • Matt