revert(render): near plane back to 1.0m pending #110 - 0.1 correlated with missing indoor textures

Bisect (user-gated): two consecutive runs on 0.1 lost indoor textures; the 1.0 bisect run rendered clean. #105 tripwires silent on the bad runs (GL-side). No known mechanism links the near plane to texturing - #110 filed to investigate (RenderDoc / flip-testing) before re-landing retail's znear=0.1, which the corner see-through fix depends on. Comments on all four cameras point at #110 so the retail value is not re-landed blind.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-10 11:02:55 +02:00
parent 137b4f2d25
commit 8bd3492612
5 changed files with 40 additions and 13 deletions

View file

@ -3768,6 +3768,31 @@ stable now; this is a draw-order/depth oscillation localized to the door surface
--- ---
## #110 — Near plane 0.1 m (retail znear) correlates with missing indoor textures; corner see-through blocked on it
**Status:** OPEN
**Severity:** HIGH (blocks the §4 corner see-through fix)
**Component:** render / camera projection (+ possibly texture upload / #105 interaction)
Retail runs `Render::znear = 0.1` (decomp :342173, initializer :1101867); ours is 1.0 m.
Because the camera-collision sphere holds the eye 0.3 m from walls, the 1.0 m near plane
clips away any wall the camera presses against — the §4 "camera clipping into the wall"
corner background (user-gated 2026-06-10, unchanged by the flood fix `dac8f6a`).
Landing 0.1 (`137b4f2`) fixed the geometry relationship but correlated with MISSING INDOOR
TEXTURES on two consecutive runs; the 1.0 bisect run immediately rendered clean, and the
change was reverted same-day. The #105 dat-miss tripwires were SILENT on the bad runs
(GL-side per the #105 protocol). No mechanism is known by which the near plane affects
texturing — candidates: (a) coincidence with the intermittent #105 (2/2-then-1/1 is a small
sample), (b) a depth-precision interaction (near 0.1 + far 5000 = 50k ratio) breaking a
depth-dependent pass indoors, (c) something in the visible-set/prepare path scaling with
the wider near frustum. Investigation: re-land 0.1 locally, reproduce, RenderDoc the
missing-texture frame; or flip-test 0.1↔1.0 over N runs to settle (a) statistically.
User question pending: did the missing textures render WHITE (upload path) or INVISIBLE
(visibility/depth)?
---
--- ---
# Recently closed # Recently closed

View file

@ -59,9 +59,9 @@ public sealed class ChaseCamera : ICamera
public Matrix4x4 View => public Matrix4x4 View =>
Matrix4x4.CreateLookAt(Position, _lookAt, Vector3.UnitZ); Matrix4x4.CreateLookAt(Position, _lookAt, Vector3.UnitZ);
// Near plane 0.1 m = retail Render::znear (see RetailChaseCamera.Projection). // Near plane: retail is 0.1 m, parked pending #110 (see RetailChaseCamera.Projection).
public Matrix4x4 Projection => public Matrix4x4 Projection =>
Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 0.1f, 5000f); Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 1f, 5000f);
/// <summary> /// <summary>
/// Update the camera position to follow the player. <paramref name="isOnGround"/> /// Update the camera position to follow the player. <paramref name="isOnGround"/>

View file

@ -32,9 +32,9 @@ public sealed class FlyCamera : ICamera
} }
} }
// Near plane 0.1 m = retail Render::znear (see RetailChaseCamera.Projection). // Near plane: retail is 0.1 m, parked pending #110 (see RetailChaseCamera.Projection).
public Matrix4x4 Projection public Matrix4x4 Projection
=> Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 0.1f, 5000f); => Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 1f, 5000f);
/// <summary> /// <summary>
/// Integrate position for one frame based on WASD + vertical keys. /// Integrate position for one frame based on WASD + vertical keys.

View file

@ -23,6 +23,7 @@ public sealed class OrbitCamera : ICamera
} }
} }
// Near plane: retail is 0.1 m, parked pending #110 (see RetailChaseCamera.Projection).
public Matrix4x4 Projection public Matrix4x4 Projection
=> Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 0.1f, 5000f); => Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 1f, 5000f);
} }

View file

@ -38,15 +38,16 @@ public sealed class RetailChaseCamera : ICamera
public float Aspect { get; set; } = 16f / 9f; public float Aspect { get; set; } = 16f / 9f;
public float FovY { get; set; } = MathF.PI / 3f; public float FovY { get; set; } = MathF.PI / 3f;
public Matrix4x4 View { get; private set; } = Matrix4x4.Identity; public Matrix4x4 View { get; private set; } = Matrix4x4.Identity;
// Near plane = retail Render::znear = 0.1 m (decomp :342130/:342173/:1101867 — // ⚠️ Near plane SHOULD be retail Render::znear = 0.1 m (decomp :342173/:1101867), and
// Render::SetFOVRad sets 0.1 flat; the legacy set_vdst variant is max(0.1, vdst·0.25)). // must eventually be smaller than the 0.3 m camera-collision sphere — at 1.0 m a wall
// MUST be smaller than the 0.3 m camera-collision sphere (PhysicsCameraCollisionProbe. // the collided eye sits 0.3 m from falls INSIDE the near plane and is clipped away
// ViewerSphereRadius): with the old 1.0 m near, a wall the collided eye sits 0.3 m from // (the §4 corner see-through, user-gated 2026-06-10). The 0.1 change was landed
// fell INSIDE the near plane and was clipped away — pressing the camera into a corner // (137b4f2) and REVERTED the same day: two consecutive runs lost indoor textures on
// let you see straight through the wall to the clear color (§4 corner residual, // 0.1 and recovered on the 1.0 bisect run. Mechanism not yet understood (a near-plane
// user-gated 2026-06-10). // change shouldn't touch texturing; the intermittent #105 may have coincided). Issue
// #110 tracks the investigation — do not re-land 0.1 without it.
public Matrix4x4 Projection => public Matrix4x4 Projection =>
Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 0.1f, 5000f); Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 1f, 5000f);
// ── Public tunables (per-instance) ────────────────────────────── // ── Public tunables (per-instance) ──────────────────────────────