Vulkan Forward+: luminance-priority tile lists when overloaded#169
Merged
cursor[bot] merged 1 commit intomainfrom May 4, 2026
Merged
Vulkan Forward+: luminance-priority tile lists when overloaded#169cursor[bot] merged 1 commit intomainfrom
cursor[bot] merged 1 commit intomainfrom
Conversation
Add r_forwardPlusLuminanceSort (0/1, default 1, archived). Tile cull gathers per-tile candidates then partial-selects top maxPerTile by RGB sum when candidates exceed the cap; 0 keeps legacy first-N index order. Extended vk_fp_push_t; SPIR-V from compile_shaders.sh --apply. Document in FORWARD_PLUS_PIPELINE_AUDIT, QUICKSTART, CHANGELOG. Co-authored-by: Tim Fox <timfox@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements roadmap item from FORWARD_PLUS_PIPELINE_AUDIT.md §8: when a 16px tile has more overlapping lights than
r_forwardPlusMaxPerTile, the tile cull now keeps the top N by RGB luminance sum (packed dlight color) instead of always taking the first N light indices.New cvar
r_forwardPlusLuminanceSort—0/1, default1,CVAR_ARCHIVE_ND. 1 = partial selection by RGB sum when overloaded; 0 = legacy first-candidate order when overloaded. Novid_restart(push constant per dispatch). Startup log when Forward+ is on and sort is 1.Implementation
forward_plus_tile_cull.comp: per-tile candidate list (max 32), then partial selection sort for firstmaxPerTilerows whencandCount > capandluminanceSort != 0.vk_forward_plus.c:vk_fp_push_textended withluminance_sortuint; pipeline layout push range size updated; dispatch fills from cvar../scripts/compile_shaders.sh --apply(shader_data.c+ generated tree).Docs
Validation
ninja -C build-vk-Release(Vulkan renderer)bash scripts/renderer_regression_check.sh— passedNotes