lightUboDeclaration.fx 993 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifdef LIGHT{X}
  2. uniform Light{X}
  3. {
  4. vec4 vLightData;
  5. vec4 vLightDiffuse;
  6. vec3 vLightSpecular;
  7. #ifdef SPOTLIGHT{X}
  8. vec4 vLightDirection;
  9. vec4 vLightFalloff;
  10. #elif defined(POINTLIGHT{X})
  11. vec4 vLightFalloff;
  12. #elif defined(HEMILIGHT{X})
  13. vec3 vLightGround;
  14. #endif
  15. vec4 shadowsInfo;
  16. vec2 depthValues;
  17. } light{X};
  18. #ifdef PROJECTEDLIGHTTEXTURE{X}
  19. uniform mat4 textureProjectionMatrix{X};
  20. uniform sampler2D projectionLightSampler{X};
  21. #endif
  22. #ifdef SHADOW{X}
  23. #if defined(SHADOWCUBE{X})
  24. uniform samplerCube shadowSampler{X};
  25. #else
  26. varying vec4 vPositionFromLight{X};
  27. varying float vDepthMetric{X};
  28. #if defined(SHADOWPCSS{X})
  29. uniform highp sampler2DShadow shadowSampler{X};
  30. uniform highp sampler2D depthSampler{X};
  31. #elif defined(SHADOWPCF{X})
  32. uniform highp sampler2DShadow shadowSampler{X};
  33. #else
  34. uniform sampler2D shadowSampler{X};
  35. #endif
  36. uniform mat4 lightMatrix{X};
  37. #endif
  38. #endif
  39. #endif