Combine water and mirror shader
Posted: Sat Mar 06, 2010 12:01 am
Recently I was wondering if it was possible to have a water texture that gives you some kind of mirror effect.
Here is the water shader I am using in q3ct4 - it is basically the same as IDs water shader just adjusted to the map:
And here IDs mirror shader:
I tried to merge them but I wasn't able to manage it for some reason - I always messed up the water look. Anyone has an idea?
Here is the water shader I am using in q3ct4 - it is basically the same as IDs water shader just adjusted to the map:
Code: Select all
textures/q3ct4/water
{
qer_editorimage textures/liquids/pool3d_3.tga
qer_trans .5
q3map_globaltexture
surfaceparm trans
surfaceparm nonsolid
surfaceparm water
q3map_surfacelight 0
q3map_lightimage textures/q3ct4/watercolor.tga
nopicmip
cull disable
deformVertexes wave 64 sin .5 .5 0 .5
{
map textures/liquids/pool3d_5.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .5 .5
tcmod transform 1.5 0 1.5 1 1 2
tcmod scroll -.05 .001
}
{
map textures/liquids/pool3d_6.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .5 .5
tcmod transform 0 1.5 1 1.5 2 1
tcmod scroll .025 -.001
}
{
map textures/liquids/pool3d_3.tga
blendFunc GL_dst_color GL_one
rgbgen identity
tcmod scale .25 .5
tcmod scroll .001 .025
}
{
map $lightmap
blendFunc GL_dst_color GL_zero
rgbgen identity
}
}
Code: Select all
textures/sfx/bugmirror
{
qer_editorimage textures/sfx/mirrorkc.tga
surfaceparm nolightmap
portal
{
map textures/common/mirror1.tga
blendfunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
depthWrite
}
{
map textures/sfx/mirrorkc.tga
blendFunc add
depthfunc equal
}
}