Removed wierd glow on water

This commit is contained in:
tleety
2015-09-29 11:10:08 +02:00
parent 38d3a8c990
commit a1c709a2db
2 changed files with 3 additions and 3 deletions
@@ -61,9 +61,9 @@ void main()
sum += texture(WaterTexture, vec2(tc.x + 3.0*blur*hstep, tc.y + 3.0*blur*vstep)) * 0.0540540541;
sum += texture(WaterTexture, vec2(tc.x + 4.0*blur*hstep, tc.y + 4.0*blur*vstep)) * 0.0162162162;
frag_Diffuse = vec4(sum.rgb, 1.0) * vec4(0.0, 0.6, 1.5, 1.0);
float avgColor = frag_Diffuse.r + frag_Diffuse.g + frag_Diffuse.b;
float avgColor = sum.r + sum.g + sum.b;
avgColor = avgColor/3;
frag_Diffuse = vec4(sum.r, sum.g, sum.b, 1.0);
if ( avgColor*dir.y > Threshhold ){
frag_Diffuse = vec4(0.0, 0.3, 1.0, 1.0);
}