translucent_red - shader


(WoodwilL) #1

I want to change the translucent_red shader in the mapfx folder to a different color and I have no clue how to mess with shader files.

Here are two shots with translucent_red on the “sphere”.

Any help would be appreciated.

textures/mapfx/translucent
{
qer_editorimage textures/common/dirtymirror.tga
cull none
surfaceparm glass
surfaceparm pointlight
surfaceparm trans
{
map textures/common/dirtymirror.tga
blendFunc GL_ONE GL_ONE
rgbGen identity
tcgen environment
}
}

textures/mapfx/translucent_red
{
qer_editorimage textures/common/dirtymirror.tga
cull none
surfaceparm glass
surfaceparm pointlight
surfaceparm trans
{
map textures/common/dirtymirror.tga
blendFunc GL_ONE GL_ONE
rgbGen wave sin 1 1 0 1
tcgen environment
}
{
map $whiteimage
blendfunc filter
rgbGen const ( 1.0 0.6 0.6 )
}
}


(damocles) #2

The last line in the shader:

rgbGen const ( 1.0 0.6 0.6 )

sets the colour. It’s basically saying use this RGB value as a sort of all-over colour. So 1.0, 0.6 and 0.6 give full red, with green/blue components set to .6 resulting in light red. Change these three values to whatever you want (but in your new copied shader, not the original ones)


(WoodwilL) #3

Thanks a bunch.

Results

Not sure If I will leave it black but you have helped me tremendously.
:banana:

btw- .3 .3 .3 is black, Im gonna make tons more if anyone wants them.


(chavo_one) #4

actually, isn’t 0 0 0 black? And .3 .3 .3 is just a really dark grey.


(WoodwilL) #5

Yeah thats right. If I set it 0 0 0 though it would be opaque… I think.


(Doc) #6

No, that is just the colour, not the transparency. Well, at least I think that’s right, I haven’t actually tried it, but I’d be very surprised if it was indeed opaque.