background: round down fractional y offsets
Otherwise there is a chance that we'll end up with a 1-pixel transparent gap between tiled textures
This commit is contained in:
1 parent
32e53a7834
commit
3dfb570162
1 file changed
+1
-1
@@ -526,7 +526,7 @@ impl crate::TermWindow {
|
||||
if let Some(factor) = layer.def.attachment.scroll_factor() {
|
||||
let distance = top as f32 * self.render_metrics.cell_size.height as f32 * factor;
|
||||
let num_tiles = distance / repeat_y;
|
||||
origin_y -= num_tiles.fract() * repeat_y;
|
||||
origin_y -= (num_tiles.fract() * repeat_y).floor();
|
||||
start_tile = num_tiles.floor() as usize;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user