
I’ve created a watersurface for my featured map. And to make it look more realistic I want to give it a reflection of the sun. However, my reflection is mirrored in the y-ax of the texture. In other words: I can see the sun at the west-side reflecting in the watersurface, but I can also see the sun reflecting at the east-side of the water.
This is my shader:
textures/terrain_dm_castle/water
{
qer_editorimage textures/terrain_dm_castle/water1.tga
qer_trans .5
q3map_globaltexture
surfaceparm trans
surfaceparm nonsolid
surfaceparm water
surfaceparm nomarks
cull none
nopicmip
nomipmap
nofog
deformVertexes wave 160 sin 0 2 0 0.3
q3map_tcMod rotate 20
{
map textures/terrain_dm_castle/water3.tga
blendFunc blend
alphaFunc GT0
rgbGen identity
rgbGen wave sin .2 .8 .5 0
tcmod turb .01 .05 .25 .1
tcmod scale 1.4 1.5
tcmod scroll -.018 .002
}
{
map textures/terrain_dm_castle/water2.tga
detail
blendFunc blend
alphaFunc GT0
rgbGen identity
rgbGen wave sin .4 .6 .6 0
tcmod turb .01 .05 0 .1
tcmod scale 0.4 0.4
tcmod scroll .02 -.001
}
{
map textures/terrain_dm_castle/water_ref.tga //reflection (bug)
blendFunc GL_ONE GL_ONE
rgbGen vertex
tcGen environment
tcMod scale 1 2
}
}
Additional information:
I use deformvertex but without deformvertex the problem stays.
I use tcMod scale 1 2 so you can see the sunreflection. Else it was to far from view of the player and you couldn’t see the sun. I tested the shader without this value but the problem stays.
It looks like the shader breaks the texture into 2 parts mirrored from each other. This means I can see the left part of my texture, where the sun shines, but that the other half without the sun isn’t show in the water.
Does anyone has the problem before or know how the fix it?
