Skip to content

Skip drawing invisible voxel sections#2096

Merged
Metadorius merged 6 commits intoPhobos-developers:developfrom
Metadorius:feature/voxel-invisible-section-skip
Mar 8, 2026
Merged

Skip drawing invisible voxel sections#2096
Metadorius merged 6 commits intoPhobos-developers:developfrom
Metadorius:feature/voxel-invisible-section-skip

Conversation

@Metadorius
Copy link
Copy Markdown
Member

  • Voxel drawing code now skips sections that are invisible (have all zeros in the transform matrix main diagonal, meaning that the scale is 0% on all axes), thus increasing drawing performance for some voxels (by Kerbiter, ZivDero)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 8, 2026

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Copy link
Copy Markdown
Contributor

@Starkku Starkku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one thing but it is basically 'who cares' kind of deal.

Comment thread src/Misc/Hooks.BugFixes.cpp Outdated
@TaranDahl
Copy link
Copy Markdown
Contributor

I don't quite understand the drawing. Could you elaborate on which some voxels specifically refer to?

@Coronia
Copy link
Copy Markdown
Contributor

Coronia commented Feb 10, 2026

Tested it under SP and MP scenarios, no desync or wrong voxel displaying so far. Can be merged once it's finished

@Metadorius
Copy link
Copy Markdown
Member Author

I don't quite understand the drawing. Could you elaborate on which some voxels specifically refer to?

it is mainly intended to improve performance on section swap animated voxels, most likely that's the only thing it will improve. I am waiting for the conclusive testing results from the community members who requested that and will most likely amend the doc/code.

@TaranDahl TaranDahl added the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label Mar 5, 2026
# Conflicts:
#	docs/Fixed-or-Improved-Logics.md
#	docs/Whats-New.md
#	src/Misc/Hooks.BugFixes.cpp
@Metadorius Metadorius added Needs benchmarking This PR needs to be tested for performance. and removed Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. labels Mar 5, 2026
@Metadorius
Copy link
Copy Markdown
Member Author

Waiting on feedback from Danielovich7 on Discord.

@Metadorius
Copy link
Copy Markdown
Member Author

image Also please note the commit name.

@TaranDahl TaranDahl removed the Tested label Mar 5, 2026
- Fixed the bug that `DeploysInto` and `UndeploysInto` will make damaged techno lose 1 health.
- Fixed the issue that the Jumpjet must end its movement before starting the next mission.
- Fixed an issue where parachute units would die upon landing if bridges were destroyed during their descent.
- Voxel drawing code now skips sections that are invisible (have all zeros in the transform matrix main diagonal, meaning that the scale is 0% on all axes), thus increasing drawing performance for some voxels.
Copy link
Copy Markdown
Member Author

@Metadorius Metadorius Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Voxel drawing code now skips sections that are invisible (have all zeros in the transform matrix main diagonal, meaning that the scale is 0% on all axes), thus increasing drawing performance for some voxels.
- Voxel drawing code now skips sections that are invisible (have all zeros in the transform matrix main diagonal, meaning that the scale is 0% on all axes), thus increasing drawing performance for uncached voxels which are animated using section swap method.

Comment thread src/Misc/Hooks.BugFixes.cpp
@Metadorius Metadorius merged commit bc2b006 into Phobos-developers:develop Mar 8, 2026
4 of 6 checks passed
DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs benchmarking This PR needs to be tested for performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants