Skip to content

Commit 797ad27

Browse files
committed
Fix: 描画条件
1 parent 478baf1 commit 797ad27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Assets/HipParticle/Shaders/HipParticleMobile.shader

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@
8585
o.triuv = triVert[round(v.vertex.y)];
8686
if (abs(UNITY_MATRIX_P[0][2]) < 0.0001) sz *= 2;
8787
sz *= pow(determinant((float3x3)UNITY_MATRIX_M),1/3.0);
88-
o.vertex = vp1+float4(o.uv*sz*float2(aspectRatio,1),0,0);
88+
o.vertex = vp1+float4(o.triuv*sz*float2(aspectRatio,1),0,0);
8989
return o;
9090
}
9191

9292
fixed4 frag (v2f i) : SV_Target
9393
{
9494
float l = length(i.triuv);
95-
float3 c = tex2D(_Col, i.uv);
96-
if(length(c) < 0.1 && length(tex2D(_Pos, i.uv)) < 0.1) clip(-1);
95+
float3 c = tex2D(_Col, i.uv).xyz;
96+
if(length(c) < 0.001 && length(tex2D(_Pos, i.uv).xyz) < 0.1) clip(-1);
9797
clip(0.5-l);
9898
return float4(c, 1.0 - pow(max(0.0, abs(l) * 2.2 - 0.1), 0.2));
9999
}

0 commit comments

Comments
 (0)