mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 21:02:50 +00:00
85128a3e86
It's currently slower, and the cone splats are buggy, but the lighting code itself got some nice cleanups.
15 lines
465 B
C
15 lines
465 B
C
struct LightData {
|
|
vec4 color; // .a is intensity
|
|
vec4 position; // .w = 0 -> directional, .w = 1 -> point/cone
|
|
vec4 direction; // .w = -cos(cone_angle/2) (1 for omni/dir)
|
|
vec4 attenuation;
|
|
};
|
|
|
|
layout (constant_id = 0) const int MaxLights = 768;
|
|
|
|
layout (set = 1, binding = 0) uniform Lights {
|
|
LightData lights[MaxLights];
|
|
int lightCount;
|
|
//mat4 shadowMat[MaxLights];
|
|
//vec4 shadowCascale[MaxLights];
|
|
};
|