mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
[vulkan] Drop lights with size 0
They can't contribute any light, so no point in keeping them. Fixes the erroneous size-0 shadow maps in the second nq demo.
This commit is contained in:
parent
08721f7a21
commit
0c0fce2f03
1 changed files with 4 additions and 1 deletions
|
@ -969,9 +969,12 @@ Vulkan_LoadLights (model_t *model, const char *entity_data, vulkan_ctx_t *ctx)
|
||||||
qfv_light_t light = {};
|
qfv_light_t light = {};
|
||||||
|
|
||||||
parse_light (&light, entity, targets);
|
parse_light (&light, entity, targets);
|
||||||
|
// some lights have 0 output, so drop them
|
||||||
|
if (light.light) {
|
||||||
DARRAY_APPEND (&lctx->lights, light);
|
DARRAY_APPEND (&lctx->lights, light);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (size_t i = 0; i < ctx->frames.size; i++) {
|
for (size_t i = 0; i < ctx->frames.size; i++) {
|
||||||
lightingframe_t *lframe = &lctx->frames.a[i];
|
lightingframe_t *lframe = &lctx->frames.a[i];
|
||||||
DARRAY_RESIZE (&lframe->lightvis, lctx->lights.size);
|
DARRAY_RESIZE (&lframe->lightvis, lctx->lights.size);
|
||||||
|
|
Loading…
Reference in a new issue