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 artifacts with Octahedral Projection #7117

Merged
merged 2 commits into from
Oct 5, 2018
Merged

Fix artifacts with Octahedral Projection #7117

merged 2 commits into from
Oct 5, 2018

Conversation

OmarShehata
Copy link
Contributor

@OmarShehata OmarShehata commented Oct 5, 2018

@bagnell This fixes the black artifacts I was seeing with unwrapping the octahedral projection. Notice the black lines that become more obvious at lower mips:

unwrapping

This was happening because as you sample pixels at the edge, the linear filtering will take some of the black pixels. Pushing it 1 or half a pixel away causes seams to be visible.

What I do now is have a border that duplicates the last pixel, so when it does do the linear interpolation it uses the correct pixel. This effectively simulates linear filtering on all the pixels but nearest/clamped on border pixels.

The result:

unwrapping_fixed

The cost is one more draw call when constructing this. The Apps/Sandcastle/gallery/IBL WebGL 1.html is an example of unwrapping this projection correctly.

@cesium-concierge
Copy link

Thanks for the pull request @OmarShehata!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@bagnell
Copy link
Contributor

bagnell commented Oct 5, 2018

👍

@bagnell bagnell merged commit d378a3a into CesiumGS:ibl Oct 5, 2018
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