mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-23 02:41:30 +00:00
[vulkan] Up the light limit to 768
For now, at least (I have some ideas to possibly reduce the numbers and also to avoid the need for actual limits). I've seen gmsp3v2 use over 500 lights at once (it has over 1300), and I spent too long figuring out that weird light behavior was due to the limit being hit and lights getting dropped (and even longer figuring out that more weird behavior was due to the lack of shadows and the world being too bright in the first place).
This commit is contained in:
parent
9237d83b56
commit
e1e4bf5659
3 changed files with 10 additions and 10 deletions
|
@ -41,7 +41,7 @@
|
|||
|
||||
typedef struct qfv_lightmatset_s DARRAY_TYPE (mat4f_t) qfv_lightmatset_t;
|
||||
|
||||
#define MaxLights 256
|
||||
#define MaxLights 768
|
||||
|
||||
#define ST_NONE 0 // no shadows
|
||||
#define ST_PLANE 1 // single plane shadow map (small spotlight)
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
bindings = (
|
||||
{
|
||||
type = combined_image_sampler;
|
||||
descriptorCount = "$frames.size * size_t($properties.limits.maxSamplers)";
|
||||
descriptorCount = 768;//"$frames.size * size_t($properties.limits.maxSamplers)";
|
||||
},
|
||||
);
|
||||
};
|
||||
|
@ -291,7 +291,7 @@
|
|||
{
|
||||
binding = 0;
|
||||
descriptorType = combined_image_sampler;
|
||||
descriptorCount = $properties.limits.maxSamplers;
|
||||
descriptorCount = 768;//$properties.limits.maxSamplers;
|
||||
stageFlags = fragment;
|
||||
},
|
||||
);
|
||||
|
@ -1035,12 +1035,12 @@
|
|||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/lighting.frag;
|
||||
specializationInfo = {
|
||||
mapEntries = (
|
||||
{ size = 4; offset = 0; constantID = 0; },
|
||||
);
|
||||
data = "array(uint($properties.limits.maxSamplers))";
|
||||
};
|
||||
//specializationInfo = {
|
||||
// mapEntries = (
|
||||
// { size = 4; offset = 0; constantID = 0; },
|
||||
// );
|
||||
// data = "array(uint($properties.limits.maxSamplers))";
|
||||
//};
|
||||
},
|
||||
);
|
||||
layout = lighting_layout;
|
||||
|
|
|
@ -29,7 +29,7 @@ struct LightData {
|
|||
#define ST_CASCADE (2 << 10) // cascaded shadow maps
|
||||
#define ST_CUBE (3 << 10) // cubemap (omni, large spotlight)
|
||||
|
||||
layout (constant_id = 0) const int MaxLights = 256;
|
||||
layout (constant_id = 0) const int MaxLights = 768;
|
||||
|
||||
layout (set = 2, binding = 0) uniform sampler2DArrayShadow shadowCascade[MaxLights];
|
||||
layout (set = 2, binding = 0) uniform sampler2DShadow shadowPlane[MaxLights];
|
||||
|
|
Loading…
Reference in a new issue