Repository navigation
clean up matrix creation - #3790
Merged
Merged
Conversation
Member
|
|
ansis
force-pushed
the
matrix-cleanup
branch
from
December 13, 2016 21:58
eb942a5 to
cb6a1de
Compare
Member
|
Good to merge, pending a package.json conflict resolution. |
Member
|
Needs rebase and moving shader changes here after |
This replaces a hardcoded shader approximation with a more correct, FOV-dependent one. `gl_Position.w - 0.5` is replaced with `gl_Position.w / tan(fov)` The `/ tan(fov)` is handled by multiplying `1 / tan(fov)` into `u_gamma` outside the shader. I think `- 0.5` was just chosen as something that looked right for the default fov.
`altitude` was a terribly-named variable that was used to indirectly control the fov. This should eliminate some confusion. `altitude` was equivalent to `cameraToCenterDistance / height`
Project the extrusion and compare it's projected pixel length with the actual pixel length and adjust antialiasing accordingly. The previous approach calculated the adjustment much more indirectly and had no intuitive explanation.
ansis
force-pushed
the
matrix-cleanup
branch
from
December 14, 2016 19:09
cb6a1de to
ef5582d
Compare
This was referenced Dec 14, 2016
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This cleans up a bunch of matrix and antialiasing code.
altitudeand replaces it withfovlineStretchandlineAntialiasingMatrixrelated prs:
mapbox/mapbox-gl-shaders#41
mapbox/mapbox-gl-test-suite#193
Launch Checklist
TODO:
@lucaswoj @mourner