Skip to content
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

Merged
merged 5 commits into from
Nov 30, 2016
Merged

Line layer elevations #241

merged 5 commits into from
Nov 30, 2016

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Nov 30, 2016

No description provided.

float segmentIndex = positions.x;
vec2 mixed_temp[2];

vec2_mix_fp64(projectedSourceCoord, projectedTargetCoord, segmentIndex, mixed_temp);

float mixedElevation =
mix(instanceElevations.x, instanceElevations.y, segmentIndex);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra newline here

Copy link
Collaborator Author

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
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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

@balthazar balthazar added the P1 label Nov 30, 2016
@ibgreen ibgreen merged commit 09405d0 into master Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants