|
|
|
|
|
|
{ |
|
|
|
Properties |
|
|
|
{ |
|
|
|
_WireThickness("Wire Thickness", Range(0, 800)) = 100 |
|
|
|
_WireColor("Wire Color", Color) = (1.0,1.0.0,1.0.0,1.0) |
|
|
|
_DistanceToEdgeThreshold("Distance to Edge", float) = 1.0 |
|
|
|
_WireThickness("Thickness", Range(0, 20)) = 1 |
|
|
|
_DistanceToEdgeThreshold("Smoothing", Range(0,2)) = 0.01 |
|
|
|
_WireColor("Color", Color) = (1.0,1.0,1.0,1.0) |
|
|
|
SubShader |
|
|
|
|
|
|
|
SubShader |
|
|
|
{ |
|
|
|
Tags |
|
|
|
{ |
|
|
|
|
|
|
float4 dist : TEXCOORD2; |
|
|
|
}; |
|
|
|
|
|
|
|
half4 _WireColor; |
|
|
|
half4 _WireColor; |
|
|
|
|
|
|
|
v2g vert(appdata v) |
|
|
|
{ |
|
|
|
|
|
|
float2 edge2 = p1 - p0; |
|
|
|
|
|
|
|
float area = abs(edge1.x * edge2.y - edge1.y * edge2.x); |
|
|
|
float wireThickness = _WireThickness; |
|
|
|
float wireThickness = 20 - _WireThickness; |
|
|
|
|
|
|
|
g2f o; |
|
|
|
o.vertex = i[0].vertex; |
|
|
|
|
|
|
half4 frag(g2f i) : SV_Target |
|
|
|
{ |
|
|
|
|
|
|
|
half4 col = half4(0.0,0.0,0.0,0.0); |
|
|
|
half4 col = _WireColor;// half4(0.0,0.0,0.0,0.0); |
|
|
|
|
|
|
|
col = lerp(_WireColor, col, minDistanceToEdge); |
|
|
|
|
|
|
|
if (minDistanceToEdge > _DistanceToEdgeThreshold) |
|
|
|
{ |
|
|
|