jumpy icon indicating copy to clipboard operation
jumpy copied to clipboard

Rendering artifacts on edge of rope netting sprite

Open MaxCWhitehead opened this issue 1 year ago • 7 comments

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 avatar Aug 07 '24 04:08 MaxCWhitehead

Seems like this can be fixed by disabling MSAA.

MaxCWhitehead avatar Aug 07 '24 05:08 MaxCWhitehead

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.

MaxCWhitehead avatar Aug 07 '24 05:08 MaxCWhitehead

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: https://github.com/katharostech/bevy_retrograde/issues/51

zicklag avatar Aug 08 '24 02:08 zicklag

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

MaxCWhitehead avatar Aug 11 '24 16:08 MaxCWhitehead

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.

MaxCWhitehead avatar Aug 18 '24 18:08 MaxCWhitehead

There's a possibility this could be related to texture atlas bleeding like https://github.com/forbjok/bevy_simple_tilemap/issues/4#issuecomment-1167685856, but I'm not sure.

It's a problem that's plagued me and even Bevy: https://github.com/bevyengine/bevy/issues/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.

zicklag avatar Aug 18 '24 18:08 zicklag

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.

MaxCWhitehead avatar Aug 18 '24 20:08 MaxCWhitehead