Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Rather basic LE shaders

Page: 1 of 1
 zeimi
11-08-2003, 11:19 AM
#1
My very own light emitting shader...

textures/jedi/lamppu
{
q3map_lightimage textures/jedi/lamppu_glow
qer_editorimage textures/yavin/met_light01.jpg
q3map_surfacelight 400
q3map_lightsubdivide 128
q3map_nolightmap
{
map textures/yavin/met_light01
blendFunc GL_DST_COLOR GL_ZERO
}
{
map textures/jedi/lamppu_glow
blendFunc GL_ONE GL_ONE
glow
rgbGen identity
}
}


Why the shader becomes transparent in game?

http://koti.mbnet.fi/zeimi/img/shot0060.jpg)

The way I would want this to be is that it would emit some amount of light around itself, would have glowing effect at the light areas of the texture and no light-emitting areas would be rather dark (as dark as shows in image).

met_light01 is a basejk texture. lamppu_glow I created myself: it's this:
http://koti.mbnet.fi/zeimi/img/lamppu_glow.jpg)
 wedge2211
11-08-2003, 2:16 PM
#2
Originally posted by zeimi
{
map textures/yavin/met_light01
blendFunc GL_DST_COLOR GL_ZERO
}
{
map textures/jedi/lamppu_glow
blendFunc GL_ONE GL_ONE
glow
rgbGen identity
}
There's your problem, in bold. A blendfunc will make it so that parts of the image are blended into the background, ie, they're transparent or transluscent. Get rid of that line to make the mapped image completely opaque, or check the Q3A shader manual that comes with Gtk for the other blendfuncs.
 WadeV1589
11-08-2003, 3:19 PM
#3
He just means get rid of the blendFunc GL_DST_COLOR GL_ZERO line (as you replied with it all in bold!)
Page: 1 of 1