fix world border not being animated, remove its distance fade to only work on fixed vertical areas

This commit is contained in:
Xonk
2026-01-11 22:24:53 -05:00
parent 9857cda5dd
commit 82c0eadfef
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -493,8 +493,11 @@ void main() {
#endif
// distance fade targeting the world border...
if(TEXTURE.a < 0.7 && TEXTURE.a > 0.2) gl_FragData[0] *= clamp(1.0 - length(feetPlayerPos) / 100.0 ,0.0,1.0);
float pos = (feetPlayerPos+cameraPosition).y;
float fadeGradient = clamp(min(1.0 - (pos - 319.0)/800.0,(pos + 1000.0)/800.0),0.0,1.0);
fadeGradient *= fadeGradient*fadeGradient;
if(TEXTURE.a < 0.7 && TEXTURE.a > 0.2) gl_FragData[0].rgba *= fadeGradient;
#if DEBUG_VIEW == debug_LIGHTMAPS
gl_FragData[0].rgb = vec3(lmtexcoord.z,lmtexcoord.w,0.0)*0.1;
#endif
+1 -1
View File
@@ -73,7 +73,7 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
void main() {
lmtexcoord.xy = (gl_MultiTexCoord0).xy;
lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
vec2 lmcoord = gl_MultiTexCoord1.xy / 240.0;
lmtexcoord.zw = lmcoord;