Skip to content

Commit 1900567

Browse files
authored
Update BlurSprite.shader
1 parent c41506c commit 1900567

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BlurSprite.shader

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Shader "Solutena/Sprite/Blur"
4848
fixed4 Frag(v2f IN) : SV_Target
4949
{
5050
if(_Blur <= 0)
51-
return tex2D(_MainTex,IN.texcoord);
51+
return SampleSpriteTexture(IN.texcoord);
5252

5353
fixed4 color = 0;
5454
float sum = 0;
@@ -63,7 +63,7 @@ Shader "Solutena/Sprite/Blur"
6363
{
6464
float weight = min(1,exp( -(x * x + y * y) / sigma) / (3.14159265358979323846 * sigma));
6565
sum += weight;
66-
color += tex2D(_MainTex, IN.texcoord + float2(x, y) * _MainTex_TexelSize) * weight;
66+
color += SampleSpriteTexture(IN.texcoord + float2(x, y) * _MainTex_TexelSize) * weight;
6767
}
6868
}
6969

0 commit comments

Comments
 (0)