PDA

View Full Version : Shader Command tcGen environment


razorace
11-01-2003, 07:26 PM
Could someone please how "tcGen environment" affects your shader stage? I think it's suppose to link it to the environment somehow but I don't understand exactly what it does.

Master_Payne
11-08-2003, 07:48 PM
models/players/payne/torso
{
q3map_nolightmap
q3map_onlyvertexlighting
{
map models/players/payne/torso_metal.jpg
blendFunc GL_ONE GL_ZERO
rgbGen lightingDiffuse
}
{
map gfx/effects/lmf
blendFunc GL_DST_COLOR GL_SRC_COLOR
tcGen environment
}
{
map models/players/payne/torso.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}

}

Does this: http://usuarios.lycos.es/jedimasterpayne/shot01.jpg

*edit. Explain.
"gfx/effects/lmf" is a metallic looking image, "tcGen environment" will make i so as I move (in this case beeing a skin) the environment will be refected on the armor, is aplicable to any surface (skins, maps), it gives a nice metal look, but if polished may work to do a mirror.
Basically creates lightning reflection over the shadred surface.
Hope this helps.