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

Rendering artifacts on edge of rope netting sprite #1014

Open
MaxCWhitehead opened this issue Aug 7, 2024 · 7 comments · May be fixed by #1041
Open

Rendering artifacts on edge of rope netting sprite #1014

MaxCWhitehead opened this issue Aug 7, 2024 · 7 comments · May be fixed by #1041
Labels
kind:bug Something isn't working

Comments

@MaxCWhitehead
Copy link
Collaborator

MaxCWhitehead commented Aug 7, 2024

Description

image

I have been seeing some thin black lines to the left of the rope netting. Might be related to texture sampling settings, or maybe with atlas?

EDIT:
It seems bevy defaults to nearest sampling which seems right. It seems to flicker in and out as camera moves, wonder if we have mip maps and if that would help.

To Reproduce

No response

Expected Behavior

No response

Additional Context

No response

Log Messages

No response

@MaxCWhitehead MaxCWhitehead added the kind:bug Something isn't working label Aug 7, 2024
@MaxCWhitehead MaxCWhitehead changed the title Rendering artifacts on edge of transparent sprites Rendering artifacts on edge of rope netting sprite Aug 7, 2024
@MaxCWhitehead
Copy link
Collaborator Author

Seems like this can be fixed by disabling MSAA.

@MaxCWhitehead
Copy link
Collaborator Author

I think there are some other artifacts with pixels stretching/shrinking as the camera moves. Most notable at the tail end of smoothed movement when camera is settling down.

On bottom right of map there is a thick vertical border on the blue/greenish tile:
image

If I move camera slightly to right, it shrinks again/shifts to other tiles:
image

I wonder if should snap camera position to pixel grid - or if issue with screen resolution / pixel count / zooming camera.

github-merge-queue bot pushed a commit to fishfolk/bones that referenced this issue Aug 7, 2024
Disable MSAA when in pixel art mode. It seems to add artifacts with
texture sampling. Example: fishfolk/jumpy#1014
@zicklag
Copy link
Member

zicklag commented Aug 8, 2024

I think the shrink/shift thing is basically unavoidable with nearest-neighbor filtering unless we make sure we constrain zooms to a specific increment of physical pixels.

There are some related thoughts here: katharostech/bevy_retrograde#51

@MaxCWhitehead
Copy link
Collaborator Author

Right that makes sense regarding zoom levels, probably not something we want to change.

@MaxCWhitehead
Copy link
Collaborator Author

Re-enabling msaa as I think the shimmering seems worse. The artifact here does rarely show up without AA, so changing that doesn't seem like the fix anyway.

@zicklag
Copy link
Member

zicklag commented Aug 18, 2024

There's a possibility this could be related to texture atlas bleeding like forbjok/bevy_simple_tilemap#4 (comment), but I'm not sure.

It's a problem that's plagued me and even Bevy: bevyengine/bevy#1949

I did figure out how to fix it, but this might be a different issue.

It kind of lines up, though, because the bleeding issue tended to depend a lot of drivers/random nuances.

@MaxCWhitehead
Copy link
Collaborator Author

That definitely seems like a potential cause - glad you have done some digging on this in the past. Maybe we take a dive on this after we make rendering changes in bones, might be easier to troubleshoot and experiment with the shaders / render pipeline settings a bit less deep in engine.

RockasMockas pushed a commit to RockasMockas/bones that referenced this issue Sep 9, 2024
Disable MSAA when in pixel art mode. It seems to add artifacts with
texture sampling. Example: fishfolk/jumpy#1014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants