Page 1 of 1

Portal texture

Posted: Tue Oct 16, 2012 8:57 pm
by xandaxs
Hello folks!

I've got a portal texture I've put together and edited (for a jump map this is). But for some reason it is transparent when I don't want it to be.
I believe the shader is correct so i don't really know what's wrong.

Here's the texture:
Image

And here's the shader:

Code: Select all

textures/axanjumps/portal
{
    qer_editorimage textures/xanjumps/portal.tga
    cull disable
    //surfaceparm trans   
    surfaceparm nomarks   
    surfaceparm nolightmap
   surfaceparm nonsolid
   surfaceparm noimpact
   surfaceparm alphashadow
    //nomipmaps
          {
      clampmap textures/xanjumps/portal.tga
       tcmod rotate 25
        blendFunc add
       rgbGen identity
   }
}

Re: Portal texture

Posted: Wed Oct 17, 2012 1:42 am
by Rayne
You're using blendfunc add, that's why it's transparent.

Re: Portal texture

Posted: Wed Oct 17, 2012 1:57 pm
by xandaxs
oh -.-
thanks

Re: Portal texture

Posted: Wed Oct 17, 2012 10:19 pm
by xandaxs
After removing the blendfunc add, the alpha part turned black ig :/

Re: Portal texture

Posted: Wed Oct 17, 2012 10:33 pm
by vulture
do a normal "blendFunc blend" like I mentioned on irc yesterday... :P

Re: Portal texture

Posted: Thu Oct 18, 2012 2:40 am
by Rayne
Blendfunc add is very similar to color dodge blend mode in photoshop. So 2 bright pixels will give an extra bright pixel. That's why we use that blenfunc for stuff like fire.
Blendfunc add is similar to overlay blend mode in photoshop. And it's best for smoother alpha blends.
Blendfunc fliter is similar to multiply blend mode in photoshop. Lightmaps are applied to a surface via this blendfunc.
There are other blendfuncs but these 3 are basic.

Re: Portal texture

Posted: Thu Oct 18, 2012 4:09 am
by johnnyenglish
Rylius added this funky cheatsheet for blends

Wiki Blendmodes - so you can visualise how it might work.