-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Line layer elevations #241
Conversation
float segmentIndex = positions.x; | ||
vec2 mixed_temp[2]; | ||
|
||
vec2_mix_fp64(projectedSourceCoord, projectedTargetCoord, segmentIndex, mixed_temp); | ||
|
||
float mixedElevation = | ||
mix(instanceElevations.x, instanceElevations.y, segmentIndex); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra newline here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. We should have a glsl linter to catch that!
}, | ||
instanceElevations: { | ||
size: 2, | ||
update: this.calculateInstanceElevations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the type here be GL.UNSIGNED_BYTE
or maybe the elevation can be negative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would probably not be great since bytes only have 256 values. We want to support much better precision than that, and certainly higher elevations then 256 meters.
In this case we are using Float32s - since elevations are always in meters I assumed we don't need 64 bit values for these, like we do for long/lats.
I guess we might also want negative elevations although there are some open questions on how those should be rendered correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that makes sense, thanks
No description provided.