Repository navigation
Share neighbour cache across render paths, add /greedybench - #26
Merged
Merged
Conversation
The vanilla and VulkanMod paths now read block state, light and AO occlusion through GreedySectionCache like the Sodium path already did, instead of hitting the world for every AO corner. Measured on vanilla rendering: about 8-10% faster per section (median 0.635 vs 0.693 ms). populateFaceVisibility, the flat-water check and the AO key were copied across the three mixins; they now live in GreedyFaceVisibility. Unused imports and constants left behind are removed. Adds a per-section greedy build timer (shown in the debug HUD) and /greedybench [rounds], which rebuilds all loaded sections and prints the average, median and spread, since F3+L's compile queue does not see Sodium's chunk builder.
Generated datapack that builds a gallery of scenes on a flat world (walls, AO pillars, water, glass, lighting, orientation blocks, biome tint, roof, noise, pyramids, corridor, checkerboard) for visual and performance checks. See testing/README.md.
isFlatLighting() matched the raw text with replace/contains, which broke on tabs or newlines in the JSON. It now parses the file with Gson and re-reads it only when its modified time changes, checked at most once a second. Flat Lighting defaults cardinalLighting to true and only writes its config after the option is toggled, so a missing, unreadable or key-less file still means "not flat". Also imports Files instead of using the fully qualified name.
|
that's crazy that you can still squeeze more performance |
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.
What
GreedySectionCache, as the Sodium path already did, instead of querying the world for every AO corner.GreedyFaceVisibility.populateFaceVisibility, the flat-water check and the AO key were copy-pasted across the three mixins. They now live in one place (about 500 lines removed, 184 added). Unused imports and constants are cleaned up./greedybench [rounds]. Records the per-section greedy build time (shown in the debug HUD) and adds a client command that rebuilds all loaded sections for N rounds and prints each round's average plus the median and spread. F3+L's compile-queue metric does not see Sodium's chunk builder, so it could not measure this.isFlatLighting()now parsesflat-lighting.jsonwith Gson and re-reads it only when its modified time changes (follow-up to Flat Lighting Compatibility patch #25). A missing or key-less file still means "not flat", since Flat Lighting defaultscardinalLightingto true.testing/(generated bytesting/generate_test_pack.py) that builds a gallery of scenes for visual and performance checks. Seetesting/README.md.Measured
26.3, same spot in the test gallery, about 342 sections per round, 10 rounds each:
About 8-10% faster on the vanilla path. On Sodium the two builds were the same (about 0.16-0.19 ms), as expected, since that path already had the cache and only got the dedupe.
Not verified
pack.mcmetaformat fields for 1.21.9+ are untested.