Implement atlas padding in image pipeline

This commit is contained in:
Héctor Ramón Jiménez 2025-10-27 16:45:09 +01:00
parent 704144728f
commit ce126f5ea3
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
4 changed files with 159 additions and 63 deletions

View file

@ -735,12 +735,12 @@ fn add_instance(
_rotation: rotation,
_opacity: opacity,
_position_in_atlas: [
(x as f32 + 0.5) / atlas_size as f32,
(y as f32 + 0.5) / atlas_size as f32,
x as f32 / atlas_size as f32,
y as f32 / atlas_size as f32,
],
_size_in_atlas: [
(width as f32 - 1.0) / atlas_size as f32,
(height as f32 - 1.0) / atlas_size as f32,
width as f32 / atlas_size as f32,
height as f32 / atlas_size as f32,
],
_layer: layer as u32,
_snap: snap as u32,