mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
18 lines
631 B
Plaintext
18 lines
631 B
Plaintext
// Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
|
|
|
|
#if CC_PIPELINE_TYPE == CC_PIPELINE_TYPE_FORWARD
|
|
#define LIGHTS_PER_PASS 1
|
|
#else
|
|
#define LIGHTS_PER_PASS 10
|
|
#endif
|
|
|
|
#if CC_ENABLE_CLUSTERED_LIGHT_CULLING == 0
|
|
#pragma builtin(local)
|
|
layout(set = 2, binding = 1) uniform CCForwardLight {
|
|
highp vec4 cc_lightPos[LIGHTS_PER_PASS]; // xyz: pos, w: isSpotLight
|
|
vec4 cc_lightColor[LIGHTS_PER_PASS]; // xyz: color, w: intensity
|
|
vec4 cc_lightSizeRangeAngle[LIGHTS_PER_PASS]; // x: size, y: range, z: cos(half outterAngle), w: enable shadow
|
|
vec4 cc_lightDir[LIGHTS_PER_PASS]; // xyz: dir, w: valid light count
|
|
};
|
|
#endif
|