Skip to content

Conversation

@dknezevic
Copy link

Adds a 2px bleed ring around textures when repacking.
This removes "cracks" which can occur when zooming out.
Currently it is fixed to 2px, but it makes sense to increase it for larger textures with the formula similar to this:
width<2^10 => 0
width > 2^10 => 2^(log2(width)-10)

e.g:
512x512 => 0px
1024x1024 =>2px
2048x2048 => 4px
etc.

This is implementation of #4 and probabbly fixes #38

@HeDo88TH HeDo88TH self-assigned this Oct 12, 2025
@HeDo88TH HeDo88TH requested a review from Copilot October 12, 2025 18:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements texture bleeding/padding functionality to prevent rendering "cracks" that occur when zooming out from repacked textures. The implementation adds a 2-pixel bleed ring around each texture chart during the repacking process.

  • Adds a 2px bleed ring around textures during repacking to prevent visual artifacts
  • Refactors UV coordinate calculations and UDIM tile handling for better precision
  • Introduces a new BuildPaddedBlock method that creates padded texture charts by duplicating edge pixels

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HeDo88TH
Copy link
Collaborator

Looks go to me 🚀

@HeDo88TH HeDo88TH merged commit 71dd9da into OpenDroneMap:master Oct 12, 2025
1 check passed
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.

has a lot of cracks, after split

2 participants