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

Fix gaps in tiles when they aren't aligned. #648

Merged
merged 2 commits into from
Nov 28, 2016
Merged

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Nov 16, 2016

Non pixel-perfect tile alignment, where there are no lower level tiles, was showing slight gaps between the tiles. The code to crop right and bottom edges was being invoked, because the texture coordinates of an unaligned tile occasionally are greater than 1.

To test this would require a new selenium test, since it is purely an artifact of how textures are rendered on quads in the vgl renderer.

Non pixel-perfect tile alignment, where there are no lower level tiles, was showing slight gaps between the tiles.  The code to crop right and bottom edges was being invoked, because the texture coordinates of an unaligned tile occasionally are greater than 1.

To test this would require a new selenium test, since it is purely an artifact of how textures are rendered on quads in the vgl renderer.
@codecov-io
Copy link

codecov-io commented Nov 16, 2016

Current coverage is 86.90% (diff: 100%)

Merging #648 into master will increase coverage by 0.02%

@@             master       #648   diff @@
==========================================
  Files            87         87          
  Lines          8585       8585          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           7459       7461     +2   
+ Misses         1126       1124     -2   
  Partials          0          0          

Powered by Codecov. Last update b85183d...097cb5d

@aashish24
Copy link
Member

The code to crop right and bottom edges was being invoked, because the texture coordinates of an unaligned tile occasionally are greater than 1.

How could it be greater than one? Is it because of some computation?

@manthey
Copy link
Contributor Author

manthey commented Nov 21, 2016

The s/t coordinate of the texture is at the center of the fragment pixel being rendered. When this is pixel aligned, it is well formed, and always between 0 and 1. When it is in't pixel aligned, the renderer spans (w+1) x (h+1) pixels, with the pixels at x=0, y=0, x=w, or y=h with partial opacity (which are composited together). The s/t values are at the centers of those pixels, which can be just over 1 based on how the texture rounding works

@aashish24
Copy link
Member

okay, thanks for the explanation. LGTM 👍

@manthey manthey merged commit 044144e into master Nov 28, 2016
@manthey manthey deleted the fix-gaps-in-tiles branch November 28, 2016 16:08
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

Successfully merging this pull request may close these issues.

3 participants