SL-11589
Modify altitude blend factor in cloud shaders to fade more aggressively and fix cloud rendering artifacts when at altitude.meow-7.2.2
parent
6fbb35b712
commit
4e4011cddc
|
|
@ -78,7 +78,7 @@ void main()
|
|||
// Get relative position
|
||||
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
|
||||
|
||||
altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0);
|
||||
altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0);
|
||||
|
||||
// Set altitude
|
||||
if (P.y > 0.)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void main()
|
|||
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
|
||||
|
||||
// fade clouds beyond a certain point so the bottom of the sky dome doesn't look silly at high altitude
|
||||
altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0);
|
||||
altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0);
|
||||
|
||||
// Set altitude
|
||||
if (P.y > 0.)
|
||||
|
|
|
|||
Loading…
Reference in New Issue