From 48c0db64d5c86b8fbfe4f5e4314d2f5b3773d6a9 Mon Sep 17 00:00:00 2001 From: ppillot Date: Mon, 25 Dec 2023 12:04:42 -0500 Subject: [PATCH] Fog planes tweaking It seems the relative units might have changed between the camera and the point of focus. Pushing the fog near plane further back, seems to visually match with previous version results. --- src/viewer/viewer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer/viewer.ts b/src/viewer/viewer.ts index e6856020..9017c63f 100644 --- a/src/viewer/viewer.ts +++ b/src/viewer/viewer.ts @@ -1149,8 +1149,8 @@ export default class Viewer { this.camera.near = this.cDist - (this.bRadius * nearFactor) this.camera.far = this.cDist + (this.bRadius * farFactor) - const fogNearFactor = (50 - p.fogNear) / 50 - const fogFarFactor = -(50 - p.fogFar) / 50 + const fogNearFactor = (50 - p.fogNear) / 25 + const fogFarFactor = -(50 - p.fogFar) / 25 fog.near = this.cDist - (this.bRadius * fogNearFactor) fog.far = this.cDist + (this.bRadius * fogFarFactor) }