From 82c0eadfefb58ec5804d2474c4cab26d8d1ff11b Mon Sep 17 00:00:00 2001 From: Xonk Date: Sun, 11 Jan 2026 22:24:53 -0500 Subject: [PATCH] fix world border not being animated, remove its distance fade to only work on fixed vertical areas --- shaders/dimensions/all_particles.fsh | 7 +++++-- shaders/dimensions/all_particles.vsh | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/shaders/dimensions/all_particles.fsh b/shaders/dimensions/all_particles.fsh index 864569a..a855cac 100644 --- a/shaders/dimensions/all_particles.fsh +++ b/shaders/dimensions/all_particles.fsh @@ -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 diff --git a/shaders/dimensions/all_particles.vsh b/shaders/dimensions/all_particles.vsh index 4c3513f..38fef5e 100644 --- a/shaders/dimensions/all_particles.vsh +++ b/shaders/dimensions/all_particles.vsh @@ -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;