Fix broken water reflection/refraction mix.

Restore 1.0 alpha to prevent atmo being applied directly to water.

Fix broken shadow frust generation.
meow-7.2.2
Graham Linden 2019-05-04 09:11:59 -07:00
parent 24acb7d5c3
commit 4239705608
2 changed files with 4 additions and 5 deletions

View File

@ -149,14 +149,14 @@ void main()
vec4 fb = texture2D(screenTex, distort2);
//mix with reflection
color.rgb = fb.rgb;
color.rgb += refcol.rgb * df1;
// Note we actually want to use just df1, but multiplying by 0.999999 gets around an nvidia compiler bug
color.rgb = mix(fb.rgb, refcol.rgb, df1 * 0.99999);
vec4 pos = vary_position;
vec3 screenspacewavef = normalize((norm_mat*vec4(wavef, 1.0)).xyz);
frag_data[0] = vec4(color.rgb, 0.25); // diffuse
frag_data[0] = vec4(color.rgb, 0); // diffuse
frag_data[1] = vec4(specular * 0.15, 0.5); // speccolor, spec
frag_data[2] = vec4(encode_normal(screenspacewavef.xyz), 0.05, 0);// normalxy, 0, 0
}

View File

@ -10181,8 +10181,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
//LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
LLVector3 caster_dir(environment.getIsSunUp() ? LLVector3(environment.getClampedSunNorm()) :
environment.getIsMoonUp() ? LLVector3(environment.getClampedMoonNorm()) : LLVector3(0,0,1));
LLVector3 caster_dir(environment.getIsSunUp() ? mSunDir : mMoonDir);
//put together a universal "near clip" plane for shadow frusta
LLPlane shadow_near_clip;