Skip to content
This repository was archived by the owner on Mar 23, 2019. It is now read-only.

clean up pitched text and line antialiasing - #41

Closed
ansis wants to merge 2 commits into
masterfrom
clean-up-gamma-scale
Closed

ansis wants to merge 2 commits into
masterfrom
clean-up-gamma-scale

Conversation

@ansis

@ansis ansis commented Dec 13, 2016

Copy link
Copy Markdown
Contributor

First commit fixes text blurriness at non-default FOVs and removes a magic constant.

Second commit changes how the line antialiasing adjustment is calculated. It now projects the extrusion and compares it's projected pitched pixel length with the length it would have in a non-pitched view. It drops u_extra and u_antialiasing_matrix.

@kkaefer @lucaswoj

`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.
@ansis ansis mentioned this pull request Dec 13, 2016
7 tasks done
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
ansis force-pushed the clean-up-gamma-scale branch from f86342f to a5401d0 Compare December 13, 2016 21:56
@lucaswoj

Copy link
Copy Markdown

@ansis Sorry to pull the rug out from under you. This repo is now ⚠️ deprecated 🔥 and we'll need to move this PR over to mapbox-gl-js.

@lucaswoj

Copy link
Copy Markdown

I found an easy way to move this over to GL JS 🎉 #41

@lucaswoj
lucaswoj deleted the clean-up-gamma-scale branch December 15, 2016 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants