-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise step interpolation for lines, increase precision of line progr…
…ess as needed (#9694) * Vastly increase precision for line gradients - Step interpolant now uses gl.NEAREST for texture sampler: This allows for hard transition between different line sections when using step interpolation. Other use cases are covered by using a smooth interpolation type along with gl.LINEAR texture sampler. - Step interpolant now uses an increased texture resolution color ramp based on the total line length tile coverage to limitate the potential precision issues for high coverage - Reuse color ramp memory placement when already available - Precision is increased by two factors for geojson with line metrics on: - Tile line gradient textures for higher representation in texture space - Add an optional extension vertex buffer for increased line progress precision * Review comments (Thanks @mourner) - Eliminate Math.log2 (not available on ie11) - Inline and compress evaluation interpolations for line clip by specializing it for the use case * Optimization pass - Use single attribute for uv on x, move computation cpu side (Thanks @ansis) - Offload fragment shader from a few operations by moving it to vertex - More explicit addHalfVertex function block
- Loading branch information
1 parent
84690ba
commit d812078
Showing
21 changed files
with
619 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @flow | ||
import {createLayout} from '../../util/struct_array'; | ||
|
||
const lineLayoutAttributesExt = createLayout([ | ||
{name: 'a_uv_x', components: 1, type: 'Float32'}, | ||
{name: 'a_split_index', components: 1, type: 'Float32'}, | ||
]); | ||
|
||
export default lineLayoutAttributesExt; | ||
export const {members, size, alignment} = lineLayoutAttributesExt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.