[snipped from Q3W-LEm]
I’m making a quick SP map for RtCW and this fog problem has cropped up and I can’t seem to fix it.
The two shaders involved are lightly modified versions (fog parameters - distance, colours have been modified) from the original RtCW assets but this seems to be a big problem regardless of the textures used… water just doesn’t want to play ball with skyfog…!!
Currently problem is shown below, the surface of the water doesn’t seem to blend correctly with the fog; standing in one place and looking around the water surface fades in and out from being completely fogged to partially fogged (as you rotate around a standing spot the water surface fades in and out as you turn). The water itself (as you swim thru it) is ok, but a side effect of this non-blending surface is you get a hardline where the fogcull values start instead of a gradual blend/fade out to opaque.


skyshader
textures/kt_aserocks/sky_forest_day_3200
{
qer_editorimage textures/skies/sky_4.tga
q3map_lightimage textures/skies/n_blue.tga
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
q3map_globaltexture
q3map_lightsubdivide 1024
q3map_sun 0.06 0.07 0.10 50 325 35
q3map_surfacelight 200
fogvars ( .1 .1 .1 ) 3200
skyfogvars ( .1 .1 .1 ) 0.9
skyparms full 200 -
{
map textures/skies/newclouds.tga
blendfunc blend
tcMod scroll -0.001 -0.003
tcMod scale 6 6
depthWrite
}
}
water shader
textures/kt_aserocks/fog_water_beach
{
qer_editorimage textures/liquids/ocean_m1.tga
q3map_globaltexture
deformVertexes wave 160 sin 0 10 0 .3
nofog
surfaceparm nomarks
surfaceparm nonsolid
surfaceparm water
tesssize 768
waterfogvars ( 0.1 0.1 0.1 ) 3200
{
map $lightmap
blendfunc filter
rgbGen identity
}
{
map textures/liquids/ocean_m1b.tga
rgbgen identity
tcmod scale .4 .2
tcmod scroll .0 .007
fog on
}
}
I’m not enough of a shader monkey to see whats wrong here but something very odd is happening. Any of you chaps have a clue on this??


