-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
shader cos/sin precision affecting rendering #2110
Comments
For testing, the above image is of http://en.wikipedia.org/wiki/Iturup island to the North-East of Hokkaido. |
@fstoner can you tell me any more about how to reproduce this? What hardware/browser it happened on for example? Even with |
Nevermind, I can reproduce it on an Intel HD4600 GPU in Chrome on Windows. |
So it appears to me - correct me if I'm wrong - that the GPUs make me very sad. Given this kind of garbage from the GPU, the only solution I see is to compute the texture coordinates on the CPU, at least on GPUs with instruction limits that are too low to handle the cordic approach (and I still have no idea how to detect those GPUs). |
Low precision in the implementation of the glsl cos/sin functions causes some distortions as seen in the following 2D capture. The coastline shows a discontinuity around the middle (top-to-bottom) of the image.
Specifically, the use of the "sin" function in czm_latitudeToWebMercatorFraction seems to be the problem.
If you zoom in to a sufficient level, the transformation is assumed to be linear and the discontinuity does not appear.
The text was updated successfully, but these errors were encountered: