Skip to content

Commit

Permalink
Fix tile optimization. Make it dependent on tile resolution, not on c…
Browse files Browse the repository at this point in the history
…amera distance.
  • Loading branch information
ComBatVision committed Dec 18, 2023
1 parent 0ee75ae commit b910bfb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ open class Tile protected constructor(
val nearestPoint = nearestPoint(rc)
val distanceToCamera = nearestPoint.distanceTo(rc.cameraPoint)
// Accelerate the degradation of tile details depending on the viewing angle to tile normal
val cos = if (rc.camera.position.altitude < rc.globe.equatorialRadius / 10.0) {
val cos = if (level.tileDelta.latitude.inDegrees <= 5.625) {
val viewingVector = nearestPoint.subtract(rc.cameraPoint)
val normalVector =
rc.globe.geographicToCartesianNormal(sector.centroidLatitude, sector.centroidLongitude, scratchVector)
Expand Down

0 comments on commit b910bfb

Please sign in to comment.