We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c41506c commit 1900567Copy full SHA for 1900567
BlurSprite.shader
@@ -48,7 +48,7 @@ Shader "Solutena/Sprite/Blur"
48
fixed4 Frag(v2f IN) : SV_Target
49
{
50
if(_Blur <= 0)
51
- return tex2D(_MainTex,IN.texcoord);
+ return SampleSpriteTexture(IN.texcoord);
52
53
fixed4 color = 0;
54
float sum = 0;
@@ -63,7 +63,7 @@ Shader "Solutena/Sprite/Blur"
63
64
float weight = min(1,exp( -(x * x + y * y) / sigma) / (3.14159265358979323846 * sigma));
65
sum += weight;
66
- color += tex2D(_MainTex, IN.texcoord + float2(x, y) * _MainTex_TexelSize) * weight;
+ color += SampleSpriteTexture(IN.texcoord + float2(x, y) * _MainTex_TexelSize) * weight;
67
}
68
69
0 commit comments