From 85eb5e6b86346bb794eeaf47291c752b80afc790 Mon Sep 17 00:00:00 2001 From: WilyFoxM Date: Thu, 5 Nov 2026 21:47:16 +0300 Subject: [PATCH] Compute animated Item Display poses directly Interpolating parts get their pose from vanilla's orientation and interpolated transform times a rest learned from the last vanilla pose, instead of a full vanilla submit every frame. A part takes this path only after its rest predicted a vanilla pose; others keep the ordinary path. A new setting controls it, ON by default. --- .../drawless/diagnostics/BenchmarkSeries.java | 5 +- .../drawless/config/DrawLessConfig.java | 1 + .../wilyfox/drawless/gui/SettingsCatalog.java | 6 + .../mixin/DisplayOrientationAccessor.java | 15 ++ .../performance/LiveDisplayGeometry.java | 138 +++++++++++++++++- .../performance/RetainedInstance.java | 15 ++ .../resources/assets/drawless/lang/en_us.json | 2 + .../resources/assets/drawless/lang/ru_ru.json | 2 + src/main/resources/drawless.mixins.json | 1 + 9 files changed, 181 insertions(+), 4 deletions(-) create mode 100644 src/main/java/ru/wilyfox/drawless/mixin/DisplayOrientationAccessor.java diff --git a/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java b/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java index cdae240..c9ea366 100644 --- a/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java +++ b/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java @@ -32,6 +32,7 @@ public enum Target { PLAYER_ITEMS, PLAYER_BODY, LIVE_CULLING, + LIVE_POSES, BATCHING; String id() { @@ -54,6 +55,7 @@ void apply(boolean on) { case PLAYER_ITEMS -> c.playerItemGeometry = on; case PLAYER_BODY -> c.playerBodyGeometry = on; case LIVE_CULLING -> c.liveViewCulling = on; + case LIVE_POSES -> c.livePoseFastPath = on; case BATCHING -> c.featureBatching = on; } } @@ -64,7 +66,8 @@ boolean unavailable() { || this == PLAYER_ARMOR || this == PLAYER_ITEMS || this == PLAYER_BODY - || this == LIVE_CULLING) + || this == LIVE_CULLING + || this == LIVE_POSES) && ru.wilyfox.drawless.compat.IrisShaders.packInUse() || this == PLAYER_BODY && RenderModSupport.PLAYER_MODEL_MODS || (this == PARTICLES || this == PARTICLE_LIGHT || this == PARTICLE_COLLISION) diff --git a/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java b/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java index edca81c..542fa0b 100644 --- a/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java +++ b/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java @@ -27,6 +27,7 @@ public final class DrawLessConfig { public ExtremeDisplayMode extremeDisplayMode = ExtremeDisplayMode.LIVE_CACHE; public boolean extremeAllItemDisplays = true; public boolean liveViewCulling = true; + public boolean livePoseFastPath = true; public boolean modelEngineNpcBudget = false; public int npcGroupsPerFrame = 2; public boolean adaptiveNpcBudget = true; diff --git a/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java b/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java index ac57498..2538ce0 100644 --- a/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java +++ b/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java @@ -139,6 +139,12 @@ static List