Page 1 of 2

Glass

Posted: Mon Sep 26, 2011 10:00 pm
by Reaper{DKMs}
Okay I have been doing a ton of reserch to find a good glass shader and can't seem to find one and I am not very good with writting my own scripts unfortunately. The one I have makes the glass glow and I would like just a normal clear glass.

Re: Glass

Posted: Tue Sep 27, 2011 3:04 am
by Delirium
textures/reapers_map_name/glass
{
qer_editorimage textures/effects/tinfx.tga
qer_trans 0.7

surfaceparm nolightmap
surfaceparm trans
surfaceparm nodlight
surfaceparm lightfilter

nopicmip
{
map textures/effects/tinfx.tga
blendfunc blend
alphagen const 0.6
rgbGen vertex
}
}

Re: Glass

Posted: Wed Sep 28, 2011 11:19 pm
by Reaper{DKMs}
Very cool, thank you. Now when I compile and go into the game, its showing as a missing texture.

Re: Glass

Posted: Thu Sep 29, 2011 3:18 am
by Reaper{DKMs}
And as you can see, I have a white ring around the texture with a working script.

Re: Glass

Posted: Thu Sep 29, 2011 5:00 am
by Rayne
Add tcGen Environment to the last stage of the shaders.
If you want the glass to be brighter, change rgbGen from vertex to identity, and if you want to reduce the visibility of the reflection change the vaule in alphaGen Const from 0.6 to a lower value, 0.2 should give a more subtle reflection.

Re: Glass

Posted: Thu Sep 29, 2011 9:11 pm
by Reaper{DKMs}
Like I said, I'm not that great at this, but you meant like so?

textures/reapers_map_name/glass
{
qer_editorimage textures/effects/tinfx.tga
qer_trans 0.7

surfaceparm nolightmap
surfaceparm trans
surfaceparm nodlight
surfaceparm lightfilter

nopicmip
{
map textures/effects/tinfx.tga
blendfunc blend
alphagen const 0.6
rgbGen vertex
tcGen Environment
}
}

Re: Glass

Posted: Thu Sep 29, 2011 9:27 pm
by Rayne
yep like that

Re: Glass

Posted: Thu Sep 29, 2011 11:50 pm
by Reaper{DKMs}
Same problem

Re: Glass

Posted: Fri Sep 30, 2011 4:01 am
by Reaper{DKMs}
Here is something weird. I compiled the map. Sent a copy to a clan member and he can't see some of the default textures. But he can see the glass. But I can't. Same copy. Why is this?

Re: Glass

Posted: Fri Sep 30, 2011 4:39 am
by Rayne
OK I'm starting to think you and ReSnappa have the same problem. Something is messing up the shaders, you got any pk3's left in that folder?
Cause i tried that shader and it works flawlessly.