You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
724 B
27 lines
724 B
#ifndef SG_DEPTH_ONLY_PASS_INCLUDED |
|
#define SG_DEPTH_ONLY_PASS_INCLUDED |
|
|
|
PackedVaryings vert(Attributes input) |
|
{ |
|
Varyings output = (Varyings)0; |
|
output = BuildVaryings(input); |
|
PackedVaryings packedOutput = (PackedVaryings)0; |
|
packedOutput = PackVaryings(output); |
|
return packedOutput; |
|
} |
|
|
|
half4 frag(PackedVaryings packedInput) : SV_TARGET |
|
{ |
|
Varyings unpacked = UnpackVaryings(packedInput); |
|
UNITY_SETUP_INSTANCE_ID(unpacked); |
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(unpacked); |
|
SurfaceDescription surfaceDescription = BuildSurfaceDescription(unpacked); |
|
|
|
#if _ALPHATEST_ON |
|
clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold); |
|
#endif |
|
|
|
return 0; |
|
} |
|
|
|
#endif
|
|
|