gwj
2025-09-15 fae140d8f196316bd9c5440880a0391feda26f5b
Shader/OutlineEx.shader
@@ -134,7 +134,7 @@
            const fixed sinArray[12] = { 0, 0.5, 0.866, 1, 0.866, 0.5, 0, -0.5, -0.866, -1, -0.866, -0.5 };
            const fixed cosArray[12] = { 1, 0.866, 0.5, 0, -0.5, -0.866, -1, -0.866, -0.5, 0, 0.5, 0.866 };
            float2 pos = IN.texcoord + _MainTex_TexelSize.xy * float2(cosArray[pIndex], sinArray[pIndex]) * IN.normal.z*0.2;   //normal.z 存放 _OutlineWidth
            float2 pos = IN.texcoord + _MainTex_TexelSize.xy * float2(cosArray[pIndex], sinArray[pIndex]) * IN.normal.z*0.12;   //normal.z 存放 _OutlineWidth
            return IsInRect(pos, IN.uv1, IN.uv2) * (tex2D(_MainTex, pos) + _TextureSampleAdd).w * IN.tangent.w;      //tangent.w  存放 _OutlineColor.w
         }