From f894a387c17fe0a673db1f75010d9d01c53e28a8 Mon Sep 17 00:00:00 2001 From: Donovan Hutchence Date: Fri, 20 Feb 2026 09:53:47 +0000 Subject: [PATCH] latest --- src/scene/camera.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/scene/camera.js b/src/scene/camera.js index def84245e43..819b34f4a39 100644 --- a/src/scene/camera.js +++ b/src/scene/camera.js @@ -268,6 +268,10 @@ class Camera { this._farClip = newValue; this._projMatDirty = true; } + if (this._xr?.active) { + this._xrProperties.farClip = newValue; + this._xr._setClipPlanes(this._xrProperties.nearClip, newValue); + } } get farClip() { @@ -330,6 +334,10 @@ class Camera { this._nearClip = newValue; this._projMatDirty = true; } + if (this._xr?.active) { + this._xrProperties.nearClip = newValue; + this._xr._setClipPlanes(newValue, this._xrProperties.farClip); + } } get nearClip() { @@ -764,10 +772,10 @@ class Camera { * @ignore */ fillShaderParams(output) { - const f = this._farClip; + const f = this.farClip; output[0] = 1 / f; output[1] = f; - output[2] = this._nearClip; + output[2] = this.nearClip; output[3] = this._projection === PROJECTION_ORTHOGRAPHIC ? 1 : 0; return output; }