这句是后加的,取消遮挡消隐;/这句可以注释掉,能够避免线框太粗出现的模糊效果。
, uv1, uv2
struct appdata
{
float4 vertex : POSITION;
float4 texcoord1 : TEXCOORD0; vertex input.color = v.y: position;RenderType: COLOR;
};
v2f vert (appdata v)
{
v2f o;
o.pos = mul( UNITY_MATRIX_MVP, v;Cull Off/.y);
float hx = step(i.texcoord1.x, 1, Color) = (1,1,1,0)
_LineWidth (Line Width.texcoord1; }
/ = Transparent.texcoord1 = v.color;
uniform float4 _GridColor;
float4 color ;
float4 color ;
float ly = step(_LineWidth, i.texcoord1;
o;
float hy = step(i;/ Blend SrcAlpha OneMinusSrcAlpha.0 - _LineWidth)可以自己写一个Shader
Shader Custom, float) = 0, i.texcoord1.x);
}
ENDCG
}
}
Fallback Vertex Colored, Color) = (1,1,1,1)
_GridColor (Grid Color;
return o;
}
fixed4 frag(v2f i) : COLOR
{
fixed4 answer;
uniform float _LineWidth;
/, 1.0 - _LineWidth);
answer = lerp(_LineColor, _GridColor, lx*ly*hx*hy);
return answer;
float lx = step(_LineWidth;/Tags { .vertex).2
}
SubShader
{
Pass
{
.texcoord1;
o;/AlphaTest Greater 0.5
/: COLOR;
};
struct v2f
{
float4 pos : POSITION;
float4 texcoord1 : TEXCOORD0,体现出透明
CGPROGRAM
pragma vertex vert
pragma fragment frag
uniform float4 _LineColor;WireFrame
{
Properties
{
_LineColor (Line Color