Ticket #5125: water_contrast.patch
File water_contrast.patch, 1.3 KB (added by , 6 years ago) |
---|
-
binaries/data/mods/public/shaders/glsl/water_high.fs
283 283 float refVY = clamp(v.y*2.0,0.05,1.0); 284 284 285 285 // Distort the reflection coords based on waves. 286 reflCoords = (0.5*reflectionCoords.xy - 15.0* n.zx / refVY) / reflectionCoords.z + 0.5;286 reflCoords = (0.5*reflectionCoords.xy - 2.5 * n.zx / refVY) / reflectionCoords.z + 0.5; 287 287 vec4 refTex = texture2D(reflectionMap, reflCoords); 288 289 // increase contrast of object reflections and adjust saturation 290 refTex.rgb = (refTex.rgb - 0.5) * 1.2 + 0.5; 291 refTex.rgb = mix(vec3(dot(refTex.rgb, vec3(0.299, 0.587, 0.114))), refTex.rgb, 0.8); 288 292 289 293 reflColor = refTex.rgb; 290 294 291 if (refTex.a < 0.99)295 if (refTex.a < 1.0) 292 296 { 293 297 // Calculate where we intersect with the skycube. 294 298 Ray myRay = Ray(vec3(worldPos.x/4.0,worldPos.y,worldPos.z/4.0),eye); … … 303 307 } 304 308 305 309 // reflMod is used to reduce the intensity of sky reflections, which otherwise are too extreme. 306 reflMod = max(refTex.a, 0. 75);310 reflMod = max(refTex.a, 0.65); 307 311 #else 308 312 reflMod = 0.75; 309 313 reflColor = vec3(0.15, 0.7, 0.82);