初期コミット
This commit is contained in:
26
Assets/Yurowm/Shaders/SkinShader.shader
Normal file
26
Assets/Yurowm/Shaders/SkinShader.shader
Normal file
@@ -0,0 +1,26 @@
|
||||
Shader "Yurowm/SkinShader" {
|
||||
Properties {
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
}
|
||||
SubShader {
|
||||
Tags { "RenderType" = "Opaque" }
|
||||
Cull Back
|
||||
CGPROGRAM
|
||||
#pragma surface surf Lambert
|
||||
|
||||
struct Input {
|
||||
float2 uv_MainTex;
|
||||
float3 viewDir;
|
||||
};
|
||||
sampler2D _MainTex;
|
||||
|
||||
void surf (Input IN, inout SurfaceOutput o) {
|
||||
half rim = 1.0 - saturate(dot (normalize(IN.viewDir), o.Normal));
|
||||
float3 c = tex2D (_MainTex, IN.uv_MainTex);
|
||||
o.Albedo = c.rgb/2;
|
||||
o.Emission = lerp(0.2, 1.0, pow (rim, 2)) * c.rgb;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
Fallback "Diffuse"
|
||||
}
|
||||
Reference in New Issue
Block a user