diff --git a/README.md b/README.md index 90b85bf..a8e44e1 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ rendering, and every optimization has its own switch. - Live geometry: supported Item Display models, including ModelEngine models built from them, keep their meshes on the GPU and draw together; each frame sends only poses, lighting and tint. +- Parts of these models outside the camera view are skipped for the frame; their + ticks and animation keep running. - A model cache reuses prepared model layers and refreshes them within a CPU budget. **Players** diff --git a/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java b/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java index d74801b..cdae240 100644 --- a/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java +++ b/src/dev/java/ru/wilyfox/drawless/diagnostics/BenchmarkSeries.java @@ -31,6 +31,7 @@ public enum Target { PLAYER_ARMOR, PLAYER_ITEMS, PLAYER_BODY, + LIVE_CULLING, BATCHING; String id() { @@ -52,6 +53,7 @@ void apply(boolean on) { case PLAYER_ARMOR -> c.playerArmorGeometry = on; case PLAYER_ITEMS -> c.playerItemGeometry = on; case PLAYER_BODY -> c.playerBodyGeometry = on; + case LIVE_CULLING -> c.liveViewCulling = on; case BATCHING -> c.featureBatching = on; } } @@ -61,7 +63,8 @@ boolean unavailable() { || (this == BATCHING || this == PLAYER_ARMOR || this == PLAYER_ITEMS - || this == PLAYER_BODY) + || this == PLAYER_BODY + || this == LIVE_CULLING) && 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 874ece3..edca81c 100644 --- a/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java +++ b/src/main/java/ru/wilyfox/drawless/config/DrawLessConfig.java @@ -26,6 +26,7 @@ public final class DrawLessConfig { public boolean adaptiveDisplayModelBudget = true; public ExtremeDisplayMode extremeDisplayMode = ExtremeDisplayMode.LIVE_CACHE; public boolean extremeAllItemDisplays = true; + public boolean liveViewCulling = 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 9020eab..ac57498 100644 --- a/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java +++ b/src/main/java/ru/wilyfox/drawless/gui/SettingsCatalog.java @@ -133,6 +133,12 @@ static List