From c08021a2c893dccba87ea4361da677891f1ddb99 Mon Sep 17 00:00:00 2001 From: bottlefish <781230111@qq.com> Date: Thu, 2 Jul 2026 19:03:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(eye-shader):=20=E9=87=87=E6=A0=B7=20UV=20?= =?UTF-8?q?=E9=A5=B1=E5=92=8C=E5=B9=B6=E7=BB=9F=E4=B8=80=20half=20?= =?UTF-8?q?=E7=B2=BE=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- Assets/Render/EyeUnifiedSprite.shader | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Render/EyeUnifiedSprite.shader b/Assets/Render/EyeUnifiedSprite.shader index 3d08b3159..db02f6bed 100644 --- a/Assets/Render/EyeUnifiedSprite.shader +++ b/Assets/Render/EyeUnifiedSprite.shader @@ -133,23 +133,23 @@ Shader "AIBIS/EyeUnifiedSprite" return saturate(mul(mat, color)); } - fixed4 sampleMainTex(float2 uv) + half4 sampleMainTex(float2 uv) { - return tex2D(_MainTex, uv); + return tex2D(_MainTex, saturate(uv)); } - fixed3 GaussianBlurRgb(float2 uv, float stepSize) + half3 GaussianBlurRgb(float2 uv, float stepSize) { float angle = 1.937315; // ~111 deg, matches MemoryTuningSprite float2 stepDir = float2(sin(angle), cos(angle)); float2 stepUv = stepDir * stepSize; #if defined(SHADER_API_MOBILE) - fixed3 rgb = sampleMainTex(uv).rgb * 0.34; + half3 rgb = sampleMainTex(uv).rgb * 0.34; rgb += sampleMainTex(uv + stepUv).rgb * 0.33; rgb += sampleMainTex(uv - stepUv).rgb * 0.33; #else - fixed3 rgb = sampleMainTex(uv).rgb * 0.18; + half3 rgb = sampleMainTex(uv).rgb * 0.18; rgb += sampleMainTex(uv + stepUv * 1.0).rgb * 0.15; rgb += sampleMainTex(uv - stepUv * 1.0).rgb * 0.15; rgb += sampleMainTex(uv + stepUv * 2.0).rgb * 0.12;