15 lines
455 B
GLSL
15 lines
455 B
GLSL
#define NUM_LIGHT_DIR 3
|
|
#define NUM_LIGHT_DOT 10
|
|
#define NUM_LIGHT_SPOT 3
|
|
#define NUM_LIGHT 16
|
|
|
|
//灯光
|
|
struct Light
|
|
{
|
|
vec3 strength; //强度
|
|
float falloffStart; //衰减起始 仅点光源、聚光灯
|
|
vec3 direction; //方向 仅平行光、聚光灯
|
|
float falloffEnd; //衰减结束 仅点光源、聚光灯
|
|
vec3 position; //位置 仅点光源、聚光灯
|
|
float spotPower; //聚光灯强度 仅聚光灯
|
|
}; |