Noob Alpha Shader Question

Having a problem with a shader or texture
Post Reply
User avatar
Lunaxe
Posts: 88
Joined: Tue Oct 25, 2011 3:48 pm
Contact:

Noob Alpha Shader Question

Post 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
Care to see some of my work? http://www.youtube.com/user/xxlunaxexx

User avatar
xandaxs
Posts: 959
Joined: Wed Aug 17, 2011 5:22 pm
Location: Oeiras, Portugal

Re: Noob Alpha Shader Question

Post by xandaxs »

You want it to blend the outside of the texture?
Like... The black part around the gate?
[12:25] <JohnnyEnglish> morning Nounou
[12:25] <JohnnyEnglish> wotcha doing?
[12:25] <Nounou> hello
[12:26] <Nounou> nothing much, i've nothing to do at work so
[12:26] <Nounou> modeling woman
[12:26] <JohnnyEnglish> woo
[12:26] <JohnnyEnglish> real women?
[12:26] <Nounou> realistic yes, on maya

Image

User avatar
Lunaxe
Posts: 88
Joined: Tue Oct 25, 2011 3:48 pm
Contact:

Re: Noob Alpha Shader Question

Post 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?
Care to see some of my work? http://www.youtube.com/user/xxlunaxexx

flajeen
Posts: 289
Joined: Wed Aug 17, 2011 7:13 pm
Location: Évora, Portugal

Re: Noob Alpha Shader Question

Post 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
Image

User avatar
ValkoVer
Posts: 176
Joined: Mon Aug 22, 2011 11:01 am
Location: Poland

Re: Noob Alpha Shader Question

Post 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
   }
}

User avatar
Lunaxe
Posts: 88
Joined: Tue Oct 25, 2011 3:48 pm
Contact:

Re: Noob Alpha Shader Question

Post 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
Care to see some of my work? http://www.youtube.com/user/xxlunaxexx

Post Reply