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 render test false negative #4864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NathanMOlson
Copy link
Contributor

@NathanMOlson NathanMOlson commented Oct 20, 2024

Fixes #4862. Merging this change will cause the terrain/fog render test to fail (as it should), due to #4859.

The pixelmatch library does not detect a difference between transparent and white. To work around this, the horizon and fog colors have been changed to not be white.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.95%. Comparing base (86ed382) to head (b869ce9).
Report is 194 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4864      +/-   ##
==========================================
- Coverage   87.66%   86.95%   -0.71%     
==========================================
  Files         265      265              
  Lines       37937    37937              
  Branches     2407     2485      +78     
==========================================
- Hits        33257    32988     -269     
- Misses       3608     3828     +220     
- Partials     1072     1121      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@NathanMOlson NathanMOlson changed the title Changed fog and horizon color to demonstrate uncaught render test error Fix render test false negative Oct 20, 2024
@HarelM
Copy link
Collaborator

HarelM commented Oct 20, 2024

I think we should not merge a failing render test though, we should update the image or fix the root cause of this test as oart of this PR.

@HarelM
Copy link
Collaborator

HarelM commented Dec 12, 2024

@NathanMOlson any updates on this PR? Can we move it forward somehow?

@NathanMOlson
Copy link
Contributor Author

This PR can be moved forward by fixing #4859. I don't know how to fix #4859.

Also, a better solution than the one in this PR would be to update the pixelmatch library to include the changes here: mapbox/pixelmatch#142. These changes have been approved by the maintainer, but have not been merged because they add processing time. I do not see a way to fix the pixelmatch library without adding processing time. In my opinion, MapLibre would be better served with a version of pixelmatch that detects transparency differences, even if it is slightly slower.

@HarelM
Copy link
Collaborator

HarelM commented Dec 17, 2024

In the past, a similar problem was solved by adding a border around the tiles to stitch different zoom level for tiles when terrain is on.
Is it possible that the border needs to be "bigger" to solve this issue (the tile is very far away).
I'm not sure it's the right fix, but wondering if it works solve the issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render test passes even though actual image is different from expected.
3 participants