From efc0f0d6d312f0cb0d9e23fa31c527987b6917eb Mon Sep 17 00:00:00 2001 From: devendrn <91605478+devendrn@users.noreply.github.com> Date: Sat, 29 Jun 2024 05:55:47 -0400 Subject: [PATCH] Fix some texture issues --- src/materials/Actor/fragment.sc | 4 ++-- src/materials/EndSky/fragment.sc | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/materials/Actor/fragment.sc b/src/materials/Actor/fragment.sc index 3810c7e5..f19d0233 100644 --- a/src/materials/Actor/fragment.sc +++ b/src/materials/Actor/fragment.sc @@ -22,8 +22,8 @@ uniform vec4 HudOpacity; uniform vec4 UVAnimation; uniform mat4 Bones[8]; -SAMPLER2D(s_MatTexture, 0); -SAMPLER2D(s_MatTexture1, 1); +SAMPLER2D_AUTOREG(s_MatTexture); +SAMPLER2D_AUTOREG(s_MatTexture1); void main() { #if DEPTH_ONLY diff --git a/src/materials/EndSky/fragment.sc b/src/materials/EndSky/fragment.sc index 682b1763..a49315bb 100755 --- a/src/materials/EndSky/fragment.sc +++ b/src/materials/EndSky/fragment.sc @@ -7,13 +7,12 @@ $input v_texcoord0, v_posTime #ifndef INSTANCING #include -SAMPLER2D(s_MatTexture, 0); +SAMPLER2D_AUTOREG(s_SkyTexture); #endif void main() { -// Instancing is off normally? #ifndef INSTANCING - vec4 diffuse = texture2D(s_MatTexture, v_texcoord0); + vec4 diffuse = texture2D(s_SkyTexture, v_texcoord0); // end sky gradient vec3 color = renderEndSky(getEndHorizonCol(), getEndZenithCol(), normalize(v_posTime.xyz), v_posTime.w);