If I want to use the alpha of the secondary color to control the blending between 2 textures, would that be possible?
I would like to use the alpha of the primary color to do transparency of the entire polygon.
I want the transparency of the polygon and the blending between the 2 textures to be dynamic. So I need some way to feed those alpha’s to the the texture combiners.
If you have more than 2 texture stages available, you can use a 1-D texture (that contains an alpha ramp) to control the blending. Then your programmable blending parameter would effectively be the 1-D texture coordinate.
[This message has been edited by DFrey (edited 01-02-2003).]
There is technically no alpha in secondary color, and there’s no way to get at an alpha. ARB_texture_env_combine doesn’t even allow you to get at any of the RGB secondary color.
The NV_register_combiners spec does have a full register corresponding to secondary color, but the initial contents of alpha are undefined.
I see that an NV_secondary_color_alpha spec was published on our developer site, but it probably shouldn’t have been – it is not supported in our driver.
It says that NV extensions is “Proposed”, so I think that’s the reason why it’s not in the extension list.
/edit/pbrown just posted while I was typing!
I was hoping that someone was gone tell me there will be a ARB_texture_env_combine2 soon
What about GL_CONSTANT? I think I can do something like
If you use glMaterial and give GL a diffuse alpha of X, then after the lighting calculations (or no lighting at all), the primary color gets an alpha of X.
Is that correct? Or maybe I misunderstood what the definition of primary color is…
I would like to query GL and see what numbers are “flying” around but no such tool
tex_env_combine aint very flexible.
what u want can be done with
register combiners
fragment_program
unfortunaly not all hardwaresupports the above extensions
>>I would like to query GL and see what numbers are “flying” around but no such tool <<
recently i restarted writing opengl state information code ill post a link when/if it ever gets finished
That would be a nice tool to have. Also try adding something that allows us to trace a vertex or any other piece of data as it goes through the GL pipe.
It would be an great educational tool for newbies.
i actually started it a couple of years ago so that should of been
recently i restarted REwriting opengl state information code ill post a link when/if it ever gets finished
(so dont hold your breath, though i done quite a bit last night )
Originally posted by V-man:
[b]That would be a nice tool to have. Also try adding something that allows us to trace a vertex or any other piece of data as it goes through the GL pipe.
It would be an great educational tool for newbies.[/b]
i actually see it being more used for optimization (eg alphatest is enabled at X time even though its not necessary) + hopefully will aid in helping to track down opengl bugs in your code.