shadowMapVertexMetric.fx 467 B

12345678910111213141516
  1. #if SM_USEDISTANCE == 1
  2. vPositionWSM = worldPos.xyz;
  3. #endif
  4. #if SM_DEPTHTEXTURE == 1
  5. // Depth texture Linear bias.
  6. gl_Position.z += biasAndScaleSM.x * gl_Position.w;
  7. #endif
  8. #if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1
  9. zSM = gl_Position.z;
  10. gl_Position.z = 0.0;
  11. #elif SM_USEDISTANCE == 0
  12. // Color Texture Linear bias.
  13. vDepthMetricSM = ((gl_Position.z + depthValuesSM.x) / (depthValuesSM.y)) + biasAndScaleSM.x;
  14. #endif