Skip to content
Snippets Groups Projects
Commit 3c13779e authored by Graham Linden's avatar Graham Linden
Browse files

SL-10946

Limit influence of refraction scale to avoid pulling in lots of background 'deep blue' pixels never written in the distortion map pass.
parent a685e024
No related branches found
No related tags found
No related merge requests found
...@@ -144,13 +144,14 @@ void main() ...@@ -144,13 +144,14 @@ void main()
refcol = mix(baseCol*df2, refcol, dweight); refcol = mix(baseCol*df2, refcol, dweight);
//figure out distortion vector (ripply) //figure out distortion vector (ripply)
vec2 distort2 = distort+wavef.xy*refScale * 0.33/max(dmod*df1, 1.0); vec2 distort2 = distort+wavef.xy*(refScale * 0.01)/max(dmod*df1, 1.0);
vec4 fb = texture2D(screenTex, distort2); vec4 fb = texture2D(screenTex, distort2);
//mix with reflection //mix with reflection
// Note we actually want to use just df1, but multiplying by 0.999999 gets around an nvidia compiler bug color.rgb = fb.rgb;
color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999); color.rgb += refcol.rgb * df1;
vec4 pos = vary_position; vec4 pos = vary_position;
vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz); vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment