-
Notifications
You must be signed in to change notification settings - Fork 6
Pixel Bleeding Between Tiles #1
Comments
Ah, I just found that the pixel bleeding seems to be only happening vertically now, and it happens more drastically when resizing the screen. Still need to get a map to reproduce on with a free artpack. |
Another discovery! With the merging of bevyengine/bevy#400, if you setup the camera like the example below, there are no lines for my test map! But at different settings for the scale of the map and the orthographic projection, they show up again. Not sure what it means, but it's another clue to the puzzle. 🕵️♂️ commands
// Spawn the map
.spawn(LdtkMapBundle {
map: asset_server.load("maps/map.ldtk"),
config: LdtkMapConfig {
set_clear_color: true,
scale: 3.0,
level: std::env::args()
.nth(2)
.map(|x| x.parse().unwrap())
.unwrap_or(0),
},
transform: Transform::from_translation(Vec3::new(0.0, 0.0, 1.0)),
..Default::default()
})
.spawn(SpriteBundle {
material: materials.add(ColorMaterial::texture(texture)),
transform: Transform::from_translation(Vec3::new(0.0, 100.0, 1.1)),
..Default::default()
})
// And the camera
.spawn(OrthographicCameraBundle {
orthographic_projection: OrthographicProjection {
scaling_mode: ScalingMode::FixedVertical,
far: 1024.,
scale: 500.,
..Default::default()
},
..OrthographicCameraBundle::new_2d()
}); |
This is no longer happening on Bevy master! I am no longer able to reproduce on the maps that I had previously experienced the glitch on. I'm closing for now, hoping it doesn't pop up again. For reference if we ever need to find out possibly what changed in the event of a regression, the working commit on master is: 5b115397baf15f66e40b50ccacbc4a1422937abb. |
Nevermind. 😞 It appears that enabling backface culling seems to help the performance enough that the issue happens less often, but it still happens. The effect seems to be related to the load of my system. For instance, when rendering on my CPUs, the effect is more common while also compiling rust while the game is running. |
I think the solution to this would be to render the map to a low-resolution framebuffer and then to use that framebuffer as the texture for a scaled up quad. I don't know how to do that with Bevy's current rendering abstraction, or whether or not that's possible yet, but that is how Bevy Retro works and it has absolutely no rendering artifacts. |
Bevy LDtk is getting merged into Bevy Retrograde so I'm closing this issue and archiveing the repo. Soon Bevy Retrograde will support Bevy's renderer ( katharostech/bevy_retrograde#41 ) which will allow you to use You won't be able to comment after the repo is archived, but you can redirect any questions or comments to the Bevy Retrograde discussions page! |
On one map, which I unfortunately can't share because of non-free assets, has an issue when zooming in and out in the
display_map
example, where there will be a brief flash of bleeding pixels in between the tiles. I believe this is due to mipmapping or level of detail as it seems to be related to zooming in and out only and tends to be accompanied by a drop in frame rate.First we need to get a map to re-produce with and second we need to figure out what's causing the issue.
The text was updated successfully, but these errors were encountered: