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

Add padding to the atlas tiles #31

Merged
merged 2 commits into from
Jan 19, 2021
Merged

Conversation

norman784
Copy link
Owner

This seems to fix #23 (comment) and #27 (comment)

@QuantumEntangledAndy
Copy link
Contributor

QuantumEntangledAndy commented Jan 17, 2021

I see yes the artifacts were probably caused by rounding error moving the closest pixel to the one just outside side of the tile.

We could also have fixed this by added a 1 pixel border with color bleeding into this border.

@norman784
Copy link
Owner Author

So far the ellipsis 1e-5 seems to work in bevy and blender, could you check in amethyst?

We could also have fixed this by added a 1 pixel border with color bleeding into this border.

About this I'm not sure how to tackle the issue when we start using textures instead of solid colors, maybe stretch by one pixel the edges?

@QuantumEntangledAndy
Copy link
Contributor

QuantumEntangledAndy commented Jan 19, 2021

I was thinking

  • at init increase texture size by +2 per tile per dimension
  • adjust start xy to accomidate the extra pixels
  • When using the set pixels:
    • if pixel is being set at the edges copy pixel to the neighbouring border padding

It is not perfect but I suspect it will reduce the visibilty of artifacts.

I also expect your 1e-5 to help with textures too as long as we always work with whole square faces

@QuantumEntangledAndy
Copy link
Contributor

Without this PR:

Screenshot 2021-01-19 at 10 32 01

With this PR:

Screenshot 2021-01-19 at 11 54 25

@QuantumEntangledAndy
Copy link
Contributor

From the pink in the tree at the bottom right I think we are still getting color bleeding from somewhere

@QuantumEntangledAndy
Copy link
Contributor

I increased the pad size to 5e-2 and that tree is still pinkish:

  • pad: 5e-2

Screenshot 2021-01-19 at 12 22 18

@QuantumEntangledAndy
Copy link
Contributor

I have gone and added border pixels too please see #34

@norman784 norman784 merged commit c735bc3 into master Jan 19, 2021
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.

2 participants