Merge pull request #1542 from Excurs1ons/fix/java-pack-bob-in-view

🤖 Agent: merged after verify passed and the integration run on the desktop.
This commit is contained in:
Ludovic Marie
2026-10-24 13:07:33 +02:00
committed by GitHub
+6 -2
View File
@@ -3402,10 +3402,14 @@ impl Renderer {
};
self.uploads
.buffer(&mut encoder, &self.globals, 0, bytemuck::bytes_of(&globals));
// 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,
view,
world_projection(frame.fov_degrees, aspect, frame.depth_far) * frame.bob,
frame.bob * view,
world_projection(frame.fov_degrees, aspect, frame.depth_far),
sun,
fog_color,
globals.fog,