Skip to content

Skip Item Displays outside the view - #41

Merged
WilyFoxM merged 1 commit into
mainfrom
feat/live-view-culling
Nov 3, 2026
Merged

WilyFoxM merged 1 commit into
mainfrom
feat/live-view-culling

Conversation

@WilyFoxM

@WilyFoxM WilyFoxM commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Problem and resulting behavior

Item Displays usually have a zero-size culling box, so vanilla does not test them against the view: everything in range is extracted, captured, uploaded and drawn, including what is behind the camera.

  • New option Skip displays outside the view on the Rendering page, ON by default. A part already on the GPU whose bounds are outside this frame's view is skipped before extraction. Its ticks and animation keep running.
  • Bounds come from the mesh and the last pose, with a margin and the entity's movement added. A billboard uses a box covering any rotation.
  • A part takes the ordinary path if it is not on the GPU, if its display data changed, or if its bounds were not confirmed in the last 50 ms (animated) or 1 s (still).
  • live_culling benchmark target in the add-on, and per-frame culled counters in the Live geometry diagnostic.

A part moving very quickly into view may appear a moment late; the setting's description says so.

Validation performed

  • GitHub checks (build, unit-tests, spotless): pending on this PR.
  • Local checks actually run (configuration and result):
    • ./gradlew spotlessApply build (JDK 25.0.4): passes, with 43 local JUnit tests.
    • English and Russian translation key sets: equal.
    • 14 fixtures covering the change, quick mode, standalone, Sodium + ImmediatelyFast and Sodium + Iris 1.11.4 with shaders off: all pass. LiveViewCullingClientTest (new), LiveDisplaySceneClientTest, LiveExtractionSceneClientTest, StaticDisplaySceneClientTest, TextAndLiveSceneClientTest, FeatureBatchLiveClientTest, DisplayModelBudgetClientTest, DisplayProbeClientTest, BenchmarkSeriesClientTest, DrawLessSettingsClientTest, ItemMeshEvictionClientTest, DisplayMembershipClientTest, ObservationClientTest, IrisShaderPackClientTest.
    • LiveViewCullingClientTest: of 16 Item Displays in a ring at FOV 70, 11 are skipped. Screenshots match OFF after a turn, after moving a skipped display into view and after giving one a new pose. The comparison covers the area above the hand and tolerates up to 8 per channel for sky fading after joining, so it would catch a missing or misplaced part, not subtle pixel changes. It uses plain cubes, not animated models.
    • The full native suite was not run; it is reserved for releases.
  • Rendering screenshots / benchmark evidence, where relevant: one field session on a live server spawn, with no other players in view, Sodium and default settings, 3 OFF/ON pairs per FOV on a stationary camera. This was the prototype with the setting toggled by the series; I did not repeat it after making it the default.
FOV 110 FOV 70
Mean paired FPS change +3.54% +3.62%
Paired changes +4.86, +1.48, +4.26% +4.80, +3.06, +2.99%
OFF range 2.71% 4.87%
Mean frame time 3.091 → 2.985 ms 2.940 → 2.821 ms
Parts skipped per frame 97 of 285 126 of 285

The OFF range is about the size of the gain, so read this as roughly 3 to 4% on this scene. I also turned the camera quickly between ModelEngine NPCs with the option on and didn't notice anything unusual; that is an observation, not pixel parity.

Limits and compatibility

One scene and one session. GPU time was not measured, and a crowded scene was not measured; with many players, Item Displays are a smaller part of the frame, so the percentage is likely lower. Fast animations of large models and models far from their entity position were not tested. While an Iris shader pack is active Live geometry is paused, so nothing is skipped. Parts on the ordinary path are not skipped. Saved configurations without this option get the new default ON.

Parts already on the GPU whose bounds lie outside this frame's view are
skipped before extraction, while their ticks and animation keep running.
A new setting controls it, ON by default, and the add-on gains a
live_culling benchmark target.
@WilyFoxM
WilyFoxM merged commit 39246c2 into main Nov 3, 2026
6 checks passed
@WilyFoxM
WilyFoxM deleted the feat/live-view-culling branch November 3, 2026 22:26
@WilyFoxM WilyFoxM mentioned this pull request Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant