diff --git a/include/QF/Vulkan/qf_lighting.h b/include/QF/Vulkan/qf_lighting.h index ef6a6bb24..9de79a94b 100644 --- a/include/QF/Vulkan/qf_lighting.h +++ b/include/QF/Vulkan/qf_lighting.h @@ -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) diff --git a/libs/video/renderer/vulkan/qfpipeline.plist b/libs/video/renderer/vulkan/qfpipeline.plist index 33fef28d3..2ee0f5846 100644 --- a/libs/video/renderer/vulkan/qfpipeline.plist +++ b/libs/video/renderer/vulkan/qfpipeline.plist @@ -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; diff --git a/libs/video/renderer/vulkan/shader/lighting.frag b/libs/video/renderer/vulkan/shader/lighting.frag index 41ee21629..4b8e516cf 100644 --- a/libs/video/renderer/vulkan/shader/lighting.frag +++ b/libs/video/renderer/vulkan/shader/lighting.frag @@ -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];