fix(render): near plane 1.0m -> 0.1m (retail Render::znear) - corner see-through-wall; file #107-#109
The collided camera eye sits 0.3m from walls (viewer_sphere radius); a 1.0m near plane clipped the wall face away, so pressing the camera into a corner showed the clear color through the wall (gate result: unchanged by the flood fix - it was never a flood bug). Retail sets Render::znear = 0.1 flat in SetFOVRad (decomp :342173, initializer :1101867). All four cameras aligned. Also files #107 (indoor spawn wedge, 3-for-3), #108 (cellar-up terrain sweep across door opening), #109 (exit-door texture/background oscillation) from the 2026-06-10 visual gate; gate confirms the dac8f6a flood fix: room-room + indoor-outdoor transitions clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
dac8f6ad1f
commit
137b4f2d25
5 changed files with 68 additions and 5 deletions
|
|
@ -38,8 +38,15 @@ public sealed class RetailChaseCamera : ICamera
|
|||
public float Aspect { get; set; } = 16f / 9f;
|
||||
public float FovY { get; set; } = MathF.PI / 3f;
|
||||
public Matrix4x4 View { get; private set; } = Matrix4x4.Identity;
|
||||
// Near plane = retail Render::znear = 0.1 m (decomp :342130/:342173/:1101867 —
|
||||
// Render::SetFOVRad sets 0.1 flat; the legacy set_vdst variant is max(0.1, vdst·0.25)).
|
||||
// MUST be smaller than the 0.3 m camera-collision sphere (PhysicsCameraCollisionProbe.
|
||||
// ViewerSphereRadius): with the old 1.0 m near, a wall the collided eye sits 0.3 m from
|
||||
// fell INSIDE the near plane and was clipped away — pressing the camera into a corner
|
||||
// let you see straight through the wall to the clear color (§4 corner residual,
|
||||
// user-gated 2026-06-10).
|
||||
public Matrix4x4 Projection =>
|
||||
Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 1f, 5000f);
|
||||
Matrix4x4.CreatePerspectiveFieldOfView(FovY, Aspect, 0.1f, 5000f);
|
||||
|
||||
// ── Public tunables (per-instance) ──────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue