Page 1 of 1

Noob Alpha Shader Question

Posted: Tue Nov 15, 2011 11:40 pm
by Lunaxe
So I have a texture that is alpha textured and in .tga format, now what parameters and such do I use? Its for a gate by the way... I know how to do this with .md3's, but not just plain textures for Gtk geometry

Re: Noob Alpha Shader Question

Posted: Wed Nov 16, 2011 12:00 am
by xandaxs
You want it to blend the outside of the texture?
Like... The black part around the gate?

Re: Noob Alpha Shader Question

Posted: Wed Nov 16, 2011 12:35 am
by Lunaxe
Yea haha, sorry i didnt quite clarify :P i know to use alphaFunc GE128 or something... other than that im not quite sure how to write it properly. Could i get an example shader from somewhere maybe?

Re: Noob Alpha Shader Question

Posted: Wed Nov 16, 2011 4:13 pm
by flajeen
textures/ut4_sewers/decal_radioactivity
{
qer_editorimage textures/ut4_sewers/radioactivity.tga
polygonOffset
nomipmaps
nopicmip
surfaceparm trans
{
map textures/ut4_sewers/radioactivity.tga
blendfunc filter
}
}

from cmm shader generator

Re: Noob Alpha Shader Question

Posted: Wed Nov 16, 2011 5:25 pm
by ValkoVer
flajeen wrote:textures/ut4_sewers/decal_radioactivity
{
qer_editorimage textures/ut4_sewers/radioactivity.tga
polygonOffset
nomipmaps
nopicmip
surfaceparm trans
{
map textures/ut4_sewers/radioactivity.tga
blendfunc filter
}
}

from cmm shader generator


It's so wrong :roll: Use something like this:

Code: Select all

textures/coldwar/vv_et_mesh
{
   qer_editorimage textures/coldwar/vv_et_mesh.tga
   qer_alphafunc greater 0.5
//   surfaceparm alphashadow
        surfaceparm trans
   cull disable
        nomipmaps
   surfaceparm playerclip
   surfaceParm nolightmap
   surfaceParm noimpact
   {
      map textures/coldwar/vv_et_mesh.tga
      alphaFunc GE128
      rgbGen vertex
   }
   {
      map $lightmap
      rgbGen identity
      blendFunc GL_DST_COLOR GL_ZERO
      depthFunc equal
   }
}

Re: Noob Alpha Shader Question

Posted: Fri Nov 18, 2011 4:21 pm
by Lunaxe
You're the man ValkoVer thanks much :D I'll have screens up of what im working on with that sometime soon

Edit- I updated my Pre-Alpha topic concerning my map, has the gate in a video and thanks to you in the decription