|
|
|
|
|
|
HLSLPROGRAM |
|
|
|
// Required to compile gles 2.0 with standard srp library |
|
|
|
#pragma prefer_hlslcc gles |
|
|
|
#pragma exclude_renderers d3d11_9x |
|
|
|
#pragma target 2.0 |
|
|
|
|
|
|
|
// ------------------------------------- |
|
|
|
|
|
|
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE |
|
|
|
#pragma multi_compile _ FOG_LINEAR FOG_EXP2 |
|
|
|
#pragma multi_compile _ _SHADOWS_ENABLED |
|
|
|
#pragma multi_compile_fog |
|
|
|
|
|
|
|
//-------------------------------------- |
|
|
|
// GPU Instancing |
|
|
|
|
|
|
o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); |
|
|
|
o.clipPos = clipPos; |
|
|
|
|
|
|
|
o.shadowCoord = ComputeShadowCoord(o.clipPos); |
|
|
|
#ifdef _SHADOWS_ENABLED |
|
|
|
#if SHADOWS_SCREEN |
|
|
|
o.shadowCoord = ComputeShadowCoord(clipPos); |
|
|
|
#else |
|
|
|
o.shadowCoord = TransformWorldToShadowCoord(lwWorldPos); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
return o; |
|
|
|
} |
|
|
|
|
|
|
|