浏览代码

Fine Tuned Wireshader

/Shaders2019
Arturo Nereu 4 年前
当前提交
b7010431
共有 2 个文件被更改,包括 11 次插入12 次删除
  1. 6
      Assets/Shaders/Materials/WireFrame.mat
  2. 17
      Assets/Shaders/Shaders/Wireframe.shader

6
Assets/Shaders/Materials/WireFrame.mat


- _BumpScale: 1
- _Cull: 2
- _Cutoff: 0.5
- _DistanceToEdgeThreshold: 0.63
- _DistanceToEdgeThreshold: 0.046
- _DstBlend: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0

- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _WireThickness: 575
- _WireThickness: 0.46
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:

- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WireColor: {r: 0.3769502, g: 0.7924528, b: 0.08223568, a: 1}
- _WireColor: {r: 0.047169805, g: 0.013794942, b: 0.0149748335, a: 1}

17
Assets/Shaders/Shaders/Wireframe.shader


{
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)
{

正在加载...
取消
保存