new water
This commit is contained in:
parent
713f5943bb
commit
7361ef722a
2 changed files with 10 additions and 1 deletions
|
@ -126,7 +126,7 @@ void main (void)
|
||||||
}
|
}
|
||||||
// end shadow
|
// end shadow
|
||||||
|
|
||||||
vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, 1.0);
|
vec4 ambient_light = constantColor + gl_LightSource[0].diffuse * shadow_factor * vec4(diffuse, -1.0);
|
||||||
|
|
||||||
c1 *= ambient_light;
|
c1 *= ambient_light;
|
||||||
vec4 finalColor = c1;
|
vec4 finalColor = c1;
|
||||||
|
|
|
@ -93,5 +93,14 @@ if(gl_Fog.density == 1.0)
|
||||||
|
|
||||||
vec4 finalColor = tmp + specular;
|
vec4 finalColor = tmp + specular;
|
||||||
|
|
||||||
|
vec4 constantColor = vec4(1.0,1.0,1.0,1.0);
|
||||||
|
|
||||||
|
vec4 ambient_light = gl_LightSource[0].diffuse * constantColor + constantColor;
|
||||||
|
|
||||||
|
finalColor *= ambient_light;
|
||||||
|
|
||||||
|
if(gl_Fog.density == 1.0)
|
||||||
|
fogFactor=1.0;
|
||||||
|
|
||||||
gl_FragColor = mix(gl_Fog.color,finalColor, fogFactor);
|
gl_FragColor = mix(gl_Fog.color,finalColor, fogFactor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue