fix: voxel cache rendering corruption - #77
Merged
ZivDero merged 5 commits intoAug 30, 2026
Conversation
5 tasks
|
Development builds of cd5f29c: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
Belonit
marked this pull request as draft
August 29, 2026 22:28
Stop transparent runs at the input boundary and size the temporary buffer for worst-case voxel rows.
Advance the complete packed buffer index so the second write targets the neighboring pixel.
Convert through int before unsigned short so 8.8 coordinates wrap predictably instead of saturating in optimized clang builds.
Clear the complete color and depth buffers for each cache render, and remove obsolete previous-region tracking and partial-clear helpers.
Belonit
force-pushed
the
fix/stabilize-voxel-cache-rendering
branch
from
August 30, 2026 10:09
5f7e6da to
2ccf4ea
Compare
Contributor
Author
|
Updated after identifying the root cause: undefined conversions in the 8.8 fixed-point coordinate calculations. |
Belonit
marked this pull request as ready for review
August 30, 2026 10:11
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
Fix several independent correctness problems in voxel rendering that are
exposed by optimized clang-cl builds and can corrupt cached images.
Expected result: every cached voxel image contains only pixels produced for
that render, without coloured artifacts around voxel units.
The four fixes are:
and sizing its temporary buffer for a worst-case voxel row.
packed-buffer index.
intbeforewrapping to unsigned 8.8 coordinates.
removing unreliable previous-region tracking and the now-unused partial-clear
helpers. The performance impact on modern systems is minimal because one
contiguous
memsetis better optimized than many row-by-row calls.Behavior and compatibility
Bug fix. Maps, rules, saved games, replays, network data formats, deterministic
simulation, and COM/ABI surfaces are unchanged. The change affects only the
temporary voxel rendering cache; no migration is required.
Validation
render and confirm that the coloured artifact is absent.
Documentation
No documentation change is needed. These are internal rendering correctness
fixes that do not change a documented interface or workflow.
Checklist