Increase fill_extrusion base/height precision. #7292
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #7247: heights over 65,536 meters don't render on some devices (tested against iOS Safari). We were using the
lowp
precision qualifier for thefill-extrusion-base
andfill-extrusion-height
attributes. GLSL allows implementations to use really low precision (and small range) for lowp floats, although most implementations don't go down to the limits.See discussion in issue #2096: as a rule of thumb we want to standardize on using
highp
precision qualifiers in our shaders unless there's a specific reason we know (1) low precision won't break anything we depend on, and (2) low precision is likely to be a useful performance optimization.I tested this against a simple "landcover" extrusion layer set to 70,000 meters on iOS 11 Safari running on an iPhone 8.
Before:
After:
Launch Checklist
write tests for all new functionality(Failing test depends on a hardware configuration we can't do on CI)document any changes to public APIstagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes/cc @mollymerp @mourner @mzdraper