|
|
|
|
|
|
Pass |
|
|
|
{ |
|
|
|
Tags{"LightMode" = "ShadowCaster"} |
|
|
|
|
|
|
|
ZWrite On ZTest LEqual |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
// Required to compile gles 2.0 with standard srp library |
|
|
|
#pragma prefer_hlslcc gles |
|
|
|
#pragma target 2.0 |
|
|
|
|
|
|
|
//-------------------------------------- |
|
|
|
// GPU Instancing |
|
|
|
#pragma multi_compile_instancing |
|
|
|
|
|
|
|
#pragma vertex ShadowPassVertex |
|
|
|
#pragma fragment ShadowPassFragment |
|
|
|
|
|
|
|
#include "LWRP/ShaderLibrary/LightweightPassShadow.hlsl" |
|
|
|
ENDHLSL |
|
|
|
} |
|
|
|
|
|
|
|
Pass |
|
|
|
{ |
|
|
|
Tags{"LightMode" = "DepthOnly"} |
|
|
|
|
|
|
|
ZWrite On |
|
|
|
ColorMask 0 |
|
|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
// Required to compile gles 2.0 with standard srp library |
|
|
|
#pragma prefer_hlslcc gles |
|
|
|
#pragma target 2.0 |
|
|
|
#pragma vertex vert |
|
|
|
#pragma fragment frag |
|
|
|
|
|
|
|
#include "LWRP/ShaderLibrary/Core.hlsl" |
|
|
|
|
|
|
|
float4 vert(float4 pos : POSITION) : SV_POSITION |
|
|
|
{ |
|
|
|
return TransformObjectToHClip(pos.xyz); |
|
|
|
} |
|
|
|
|
|
|
|
half4 frag() : SV_TARGET |
|
|
|
{ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
ENDHLSL |
|
|
|
} |