Created
September 24, 2020 13:07
-
-
Save yukatayu/421b2c558457f3a9e2ed77fbc6668580 to your computer and use it in GitHub Desktop.
Shadow Caster (最小構成)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pass { | |
Tags{ "LightMode"="ShadowCaster" } | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
#pragma multi_compile_shadowcaster | |
#include "UnityCG.cginc" | |
struct appdata { | |
float4 vertex : POSITION; | |
float3 normal : NORMAL; | |
float2 texcoord : TEXCOORD0; | |
}; | |
struct v2f { | |
V2F_SHADOW_CASTER; | |
}; | |
v2f vert (appdata v) { | |
v2f o; | |
TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) | |
return o; | |
} | |
fixed4 frag (v2f i) : SV_Target { | |
SHADOW_CASTER_FRAGMENT(i) | |
} | |
ENDCG | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment