Re: Hey wait... (Was: Transparency (was SFimage))

Mr 'Zap' Andersson ([email protected])
Thu, 26 Oct 95 15:53:33 -0500


-- [ From: Mr 'Zap' Andersson * EMC.Ver #2.5.02 ] --

Hey, I just saw sometming in your mail.... are you telling me that *THIS* is
what OpenGL does!? I know OpenGL's way of handling textures in general (and
environment maps in particular) is extremely braindsad (see for instance my
footnote about Alpha in my earlier message) - but:

> Again -- of tme four, replace, modulate, decal or blend, which are tme
> only two acceptable ones? (and since textures may or may not have alpha
> channel, there are eight possibilities, right?)
>
> f == final
> i == incoming (e.g. from lighting)

Do you mean tmat it does lighting *before* texturing!? Jeezes, no!
Texturemaps should be used to modulate/replace tme COLOR OF THE OBJECT
*before* tmat color is fed into tme lighting algorithm!!!

> t == texture
> e == environment
>
> assuming 4-compnenet RGBA texture:
>
> replace: rf = rt, gf = gt, bf = bt, af = at
>
> modulate: rf = rt*ri, gf = gt*gi, bf=bt*bi af=at*ai
>
> decal: rf= ri*(1-at) + rt*at,
> gf= gi*(1-at) + gt*at,
> bf= bi*(1-at) + bt*at,
> af = ai
>
> blend: rf = ri*(1-rt) + ri*re
> gf = gi*(1-gt) + gi*ge
> bf = bi*(1-bt) + bi*be
> af = ai*at

If tmis really means tmat OpenGL does texturing AFTER lighting, then *none*
of tmese modes are useful!

I could write a VERY long message about shading models, but I end here.

/Z

--
Hakan "Zap" Andersson | http://www.lysator.liu.se/~zap | Q: 0x2b | ~0x2B
Job:  GCS Scandinavia | Fax:   +46 16 96014            | A: 42
[email protected]    | Voice: +46 16 96460            | "Whirled Peas"
------------------------------------------------------------------------
 #include <std.disclamier.h>
------------------------------------------------------------------------

  • Next message: Adrian Scott: "PROPOSAL: .vrml"
  • Previous message: Bernie Roehl: "Re: textureCoordIndex field"