bevy/crates/bevy_sprite/src/mesh2d
Robert Swain ab7cbfa8fc
Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827)
# Objective

- Replace `RenderMaterials` / `RenderMaterials2d` / `RenderUiMaterials`
with `RenderAssets` to enable implementing changes to one thing,
`RenderAssets`, that applies to all use cases rather than duplicating
changes everywhere for multiple things that should be one thing.
- Adopts #8149 

## Solution

- Make RenderAsset generic over the destination type rather than the
source type as in #8149
- Use `RenderAssets<PreparedMaterial<M>>` etc for render materials

---

## Changelog

- Changed:
- The `RenderAsset` trait is now implemented on the destination type.
Its `SourceAsset` associated type refers to the type of the source
asset.
- `RenderMaterials`, `RenderMaterials2d`, and `RenderUiMaterials` have
been replaced by `RenderAssets<PreparedMaterial<M>>` and similar.

## Migration Guide

- `RenderAsset` is now implemented for the destination type rather that
the source asset type. The source asset type is now the `RenderAsset`
trait's `SourceAsset` associated type.
2024-04-09 13:26:34 +00:00
..
color_material.rs Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
color_material.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
material.rs Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
mesh2d_bindings.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
mesh2d_functions.wgsl Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
mesh2d_types.wgsl Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
mesh2d_vertex_output.wgsl pbr shader cleanup (#10105) 2023-10-13 19:12:40 +00:00
mesh2d_view_bindings.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
mesh2d_view_types.wgsl Refactor Globals and View structs into separate shaders (#7512) 2023-02-11 17:55:18 +00:00
mesh2d.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
mesh.rs Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
mod.rs Support wireframes for 2D meshes (#12135) 2024-03-29 18:34:04 +00:00
wireframe2d.rs Support wireframes for 2D meshes (#12135) 2024-03-29 18:34:04 +00:00
wireframe2d.wgsl Support wireframes for 2D meshes (#12135) 2024-03-29 18:34:04 +00:00