变胖前
变胖后
//Shader
Shader "Custom/NormalExt" { Properties { _MainTex("Base (RGB)", 2D ) = "white"{} _Dis("Distance", Range(0.0,0.8)) = 0.1 } SubShader { Tags { "RenderType" = "Opaque" } CGPROGRAM #pragma surface surf Lambert vertex:vert sampler2D _MainTex; float _Dis; struct Input{ float2 uv_MainTex; }; void vert(inout appdata_full v) { v.vertex.xyz+=v.normal*_Dis; } void surf(Input IN, inout SurfaceOutput o) { o.Albedo = tex2D(_MainTex,IN.uv_MainTex); } ENDCG } FallBack "Diffuse" }
时间: 2024-11-10 07:06:16