Skip to content

Commit

Permalink
Fog planes tweaking
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ppillot committed Mar 17, 2024
1 parent 3772790 commit 48c0db6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viewer/viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 48c0db6

Please sign in to comment.