-
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
removed unneccisary subtraction, combined high and low parameters #3104
Conversation
@@ -38,13 +38,12 @@ float get2DMercatorYPositionFraction() | |||
float northLatitude = u_southAndNorthLatitude.y; | |||
if (northLatitude - southLatitude > maxTileWidth) | |||
{ | |||
float southMercatorYLow = u_southMercatorYLowAndHighAndOneOverHeight.x; | |||
float southMercatorYHigh = u_southMercatorYLowAndHighAndOneOverHeight.y; | |||
float southMercatorY = u_southMercatorYLowAndHighAndOneOverHeight.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u_southMercatorYLowAndHighAndOneOverHeight
doesn't need to store low and high now. It can just store the double value casted to a float.
So it can be renamed to u_southMercatorYAndOneOverHeight
and made a vec2
. Also, update the JavaScript code that sets this uniform.
Made the changes. |
var northMercatorY = WebMercatorProjection.geodeticLatitudeToMercatorAngle(northLatitude); | ||
|
||
float32ArrayScratch[0] = southMercatorY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the declaration for this.
removed the declaration |
@pjcozzi I rebuilt my branch and and refreshed the page, and now I am seeing the same thing as master |
Looks good on my machine too! |
removed unneccisary subtraction, combined high and low parameters
Closes #965.
Removed simulated double precision subtraction from
latitudeToWebMercatorFraction.glsl
and combinedhigh
andlow
parameters into onesouthMercatorY
. Changed occurrence of the function call to match the new parameters.