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

Intel graphics card offset issue #86

Closed
gnavvy opened this issue Sep 27, 2016 · 2 comments
Closed

Intel graphics card offset issue #86

gnavvy opened this issue Sep 27, 2016 · 2 comments
Assignees

Comments

@gnavvy
Copy link
Contributor

gnavvy commented Sep 27, 2016

This issue only appears on Intel graphics card.

To reproduce:

  1. Using an Intel only (e.g. Macbook Pro 13'') laptop, or use gfxCardStatus to disable the discrete AMD/nVidia Graphics card.
  2. Remove other layers and only focus on the choropleth layer (this bug is likely to affect all layers but it is easier to bug on the choropleth layer with an underlying map for reference)
  3. Zoom into street level and check the choropleth contours, there is positive offset in y direction.

screen shot 2016-09-27 at 1 42 22 pm

Possible causes:

  1. Since this only happens on Intel cards, the code logic should be correct;
  2. We only observe the offset in the y direction, and the offset scales proportionally as we zoom in and out, so very likely this is related to the mercator projection, in which the calcualtion for latitude invovles non-linear transformations (tan/log); where the calculation for the longitute (linear) does not suffer from this. And there might be precision issues/bugs in the Intel Math library (thanks @shaojingli for the hints).
  3. highp mediump related? maybe?
@howtimeflies0
Copy link

I can verify that the inaccurate tan() function from Intel's GLSL compiler is the root cause of this issue. I created a "intel_workaround" branch and replaced the tan() with my newly implemented tan_fp64(). The issue was no longer there. Please help me verify.

Of course, using an fp64 function seems to be an over-kill for this. We only need to have a more accurate tan() function in single precision.

@ibgreen
Copy link
Collaborator

ibgreen commented Oct 10, 2016

@gnavvy Fix published in v3.0.0-beta17. Please reopen if not working.

@ibgreen ibgreen closed this as completed Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants