2008-2010 - 2010-2012 - 2012-2018


Author Topic: Shader "tlight" and "tlightr"  (Read 1683 times)

War

  • (Archive)Forum Member
  • *
  • Posts (Archive): 106
Shader "tlight" and "tlightr"
« on: June 06, 2010, 11:53:31 AM »
Hello guys,

maybe not the right place to drop my question, but i know, that some awsome developers are reading also ;)
I try to make a new map for oa and in the darker passages of this level, i would like to make some hints for the right way.
The texture package "dsi" includes a red and a blue arrow, which would fit my needs with one annoying point: the background of this arrows are not invisible. They look like a plate with an arrow on it. And the plates texture doesn´t fit my requirements.
So i thought, that it would be much better, if the plate is invisible, so the arrows could be used on all other textures.

I tried to modify the shader file (new one based on the original) but unsuccessful :(
Here is the corresponding shader from pak0.pk3/scripts/oalite.shader:

Code: [Select]
textures/dsi/tlight
{
qer_editorimage textures/dsi/tlight.tga
q3map_lightimage textures/dsi/tlight.blend.tga
surfaceparm nomarks
q3map_lightsubdivide 32
q3map_surfacelight 1000
{
map textures/dsi/tlight.tga
rgbGen identity
}
{
map $lightmap
blendfunc filter
tcGen lightmap
}
{
map textures/dsi/tlight.blend.tga
blendfunc add
}
}

textures/dsi/tlightr
{
qer_editorimage textures/dsi/tlightr.tga
q3map_lightimage textures/dsi/tlightr.blend.tga
surfaceparm nomarks
q3map_lightsubdivide 32
q3map_surfacelight 1000
{
map textures/dsi/tlightr.tga
rgbGen identity
}
{
map $lightmap
blendfunc filter
tcGen lightmap
}
{
map textures/dsi/tlightr.blend.tga
blendfunc add
}
}

I had the idea, to make a forth shader stage, where i mask all the unused pixels, but my attempts failed (blendfunc GT0 etc.) ???
Any ideas?

PS: i did also a thread on oas main forum:
http://openarena.ws/board/index.php?topic=3776

Squantmuts

  • (Archive)Evil|Clan Member
  • *
  • Posts (Archive): 104
Re: Shader "tlight" and "tlightr"
« on: June 06, 2010, 13:47:16 PM »
I do not know what is customary for transparent sections in textures. But what I know is that you need to change the alpha value of that given pixel to zero to make it fully transparent. Dont know about what image format is used.