AR影子呈现 shader

Shader "FX/Matte Shadow" {

Properties{

_Color("Main Color", Color) = (1,1,1,1)

_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}

_Cutoff("Alpha cutoff", Range(0,1)) = 0.5

}

SubShader{

Tags{ "Queue" = "AlphaTest" "IgnoreProjector" = "True" "RenderType" = "TransparentCutout" }

LOD 200

Blend Zero SrcColor

CGPROGRAM

#pragma surface surf ShadowOnly alphatest:_Cutoff

fixed4 _Color;

struct Input {

float2 uv_MainTex;

};

inline fixed4 LightingShadowOnly(SurfaceOutput s, fixed3 lightDir, fixed atten)

{

fixed4 c;

c.rgb = s.Albedo*atten;

c.a = s.Alpha;

return c;

}

void surf(Input IN, inout SurfaceOutput o)

{

fixed4 c = _Color;

o.Albedo = c.rgb;

o.Alpha = 1;

}

ENDCG

}

Fallback "Transparent/Cutout/VertexLit"

}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容