From a6e9374f88c60a0b2946915ac11cab0b1faf56fc Mon Sep 17 00:00:00 2001 From: Ludovic Marie Date: Sat, 24 Oct 2026 11:30:12 +0200 Subject: [PATCH] Java shader packs: say where vanilla and Iris put the view bob Vanilla 26.3 multiplies bobHurt/bobView into the projection (GameRenderer.renderLevel); Iris's MixinModelViewBobbing moves them into the model-view when a pack is in use. The comment said vanilla keeps the bob in the PoseStack, which is Iris's behaviour, not vanilla's. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/gfx.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/horizon-client/src/gfx.rs b/crates/horizon-client/src/gfx.rs index cb2ead3f6..59a3b5d03 100644 --- a/crates/horizon-client/src/gfx.rs +++ b/crates/horizon-client/src/gfx.rs @@ -3402,11 +3402,10 @@ impl Renderer { }; self.uploads .buffer(&mut encoder, &self.globals, 0, bytemuck::bytes_of(&globals)); - // Vanilla keeps the view bob in the world's PoseStack, not in the - // projection, and packs reconstruct view positions from the depth - // buffer and multiply by `inverse_view` (`gbufferModelViewInverse`): - // with the bob in the projection instead, everything they rebuild — - // reflections, AO, godrays — slid along with the walk bob. + // Vanilla multiplies the bob into the projection (GameRenderer.renderLevel); + // Iris moves it into the model-view for packs (MixinModelViewBobbing), whose + // depth reconstruction expects a plain perspective `gbufferProjection`. + // `projection * view` is the same either way. let pack_uniform = shader_pack_uniform( frame, frame.bob * view,