cc-forward-light.chunk 889 B

123456789101112131415161718
  1. // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
  2. #if CC_PIPELINE_TYPE == CC_PIPELINE_TYPE_FORWARD
  3. #define LIGHTS_PER_PASS 1
  4. #else
  5. #define LIGHTS_PER_PASS 10
  6. #endif
  7. #if CC_ENABLE_CLUSTERED_LIGHT_CULLING == 0
  8. #pragma builtin(local)
  9. layout(set = 2, binding = 1) uniform CCForwardLight {
  10. highp vec4 cc_lightPos[LIGHTS_PER_PASS]; // xyz: pos, w: valid light type[0: directional light, 1: sphere light, 2: spot light, 3: point light, 4: ranged dir light, 5: unkown]
  11. vec4 cc_lightColor[LIGHTS_PER_PASS]; // xyz: color, w: intensity
  12. vec4 cc_lightSizeRangeAngle[LIGHTS_PER_PASS]; // x: size, y: range, z: cos(half outterAngle), w: enable shadow; ranged dir light: xyz is right
  13. vec4 cc_lightDir[LIGHTS_PER_PASS]; // xyz: dir, w: unused
  14. vec4 cc_lightBoundingSizeVS[LIGHTS_PER_PASS]; //xyz: ranged dir light node half scale, w: spot light angle attenuation strength
  15. };
  16. #endif