Skip to content

farZOffset instead of farZMultiplier (underwater data) #7754

Closed Answered by Pessimistress
jlumsden-mts asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there is a way to arbitrarily set farZ at the moment, thought I can see why it would be useful in your case. Right now farZMultiplier is still limited by another variable, so simply blowing it up does not do what you expect:

https://github.com/uber-web/math.gl/blob/d618c26869a15f277af56df8416216cf07e5c747/modules/web-mercator/src/web-mercator-utils.ts#L334

I think the right way to apply farZMultiplier should be

const farZ = Math.min(furthestDistance, horizonDistance) * farZMultiplier;

Note that where farZ maps to the real-world coordinate is dependent on the zoom level, so you may still have to adjust it as the zoom level change.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Pessimistress
Comment options

@jlumsden-mts
Comment options

Answer selected by jlumsden-mts
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants