Angus Dorbie (dorbie++at++sgi.com)
Mon, 08 Jun 1998 11:10:58 -0700
No the original request said At for blend, in otherwords it doesn't want
to
use a constant alpha value I've isolated the relevant parts of the
email:
"C = (1-At)Cf + At(Ct)"
"A = At"
"At is the alpha channel for the texel"
I agree what you describe isn't as strange but it's not what was
requested.
Looks like you did have something else in mind.
>
> GL_MODULATE multiplies Ct and Cf. This may contradict intuition (of some).
> For example, if lighting is enabled, the material colors are greenish,
> and the texture is bluish, the resulting color is blackish.
Well, this is accurate physics and desirable for a 3 band spectrum.
>
> In our Performer loader for SoftImage, this is the exact problem we
> are encountering. SoftImage may define a texture-material interaction which
> is blending by a speficied factor. To implement this in Performer (and OpenGL),
> there is no direct texture environment that is applicable. Like I mentioned,
> GL_MODULATE does not blend at all. GL_ADD is closer, but it does not multiply
> the fragment color (Cf), just the texture color (Ct). The only way to do it
> (without resorting to multipass rendering...)
> is with GL_DECAL, and RGBA texture, with the blend factor written all accross the
> alpha channel of the texture. Then it does Cv=(1-At)Cf+AtCt. However, we need
> to sacrifice the texture's alpha channel for this constant value.
> I would love to see the following texture environemnt:
> Cv=(1-Ac)Cf+AcCt
> Av=(1-Ac)Af+AcAt
Agreed, this would be usefull, but so could lots of other fragment
operations.
Right now most obviously and more usefully for me which the above
approach
could also give me.
Cv=(1-Af)Cf+AfCt
But 3D texture can handle this.
>
> I am including the formula tables from glTexEnv
> You could argue that also some of these are _very_ strange and have limited
> application :)
They are common and intuitive methods texture application once you
understand the equations. If they weren't supported we'd have a
heck of a lot more complaints about lack of functionality in texture
fragment operations.
The permutations from extending current functionality rapidly explode,
everyone requires a different operation and the fragment operation
w.r.t.
the lighting equation (diffuse vs specular) is much more of an issue.
What's needed is something more powerfull than half a dozen pre canned
texture environments, but that requires another look at the glTexEnv.
Cheers,Angus.
-- "Only the mediocre are always at their best." -- Jean GiraudouxFor advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:31 PDT