bevy/examples/2d
Anton Iacobaeus ca1874e6c6
Update texture_atlas example with different padding and sampling (#10073)
# Objective

- Expand the texture_atlas example with padding and show how it can
resolve sprite bleeding for different types of sampling.
- Fixes #9522
## Solution
Updated the texture_atlas example by adding 4 different texture atlases:
1. linear, no padding
2. linear, padding
3. nearest neighbor, no padding
4. nearest neighbor, padding

Now renders one padded and one unpadded texture atlas, and the same
upscaled sprite from each of the new texture atlases. See the screenshot
below (taken on 1080p monitor).


![Screenshot from 2023-10-10
08-37-43](https://github.com/bevyengine/bevy/assets/46004494/4cef707c-e117-4835-b2c8-66503d8c275f)

**From left->right:** linear no padding, nearest no padding, linear
padding, nearest padding.

---

---------

Co-authored-by: davidasberg <david.aasberg@gmail.com>
2023-12-14 18:48:38 +00:00
..
2d_gizmos.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
2d_shapes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
2d_viewport_to_world.rs Add example for Camera::viewport_to_world (#7179) 2023-09-11 18:52:11 +00:00
bloom_2d.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
custom_gltf_vertex_attribute.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
mesh2d.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
mesh2d_manual.rs Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
mesh2d_vertex_color_texture.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
move_sprite.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
pixel_perfect.rs Update color and naming for consistency (#10367) 2023-11-04 02:09:23 +00:00
rotation.rs Rename Input to ButtonInput (#10859) 2023-12-06 20:32:34 +00:00
sprite.rs Update color and naming for consistency (#10367) 2023-11-04 02:09:23 +00:00
sprite_flipping.rs Update color and naming for consistency (#10367) 2023-11-04 02:09:23 +00:00
sprite_sheet.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
text2d.rs Rename TextAlignment to JustifyText. (#10854) 2023-12-05 03:00:41 +00:00
texture_atlas.rs Update texture_atlas example with different padding and sampling (#10073) 2023-12-14 18:48:38 +00:00
transparency_2d.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00