bevy/crates/bevy_ui/src/render
robtfm 6e2f96f222
check sampler type in as_bind_group derives (#12637)
# Objective

currently if we use an image with the wrong sampler type in a material,
wgpu panics with an invalid texture format. turn this into a warning and
fail more gracefully.

## Solution

the expected sampler type is specified in the AsBindGroup derive, so we
can just check the image sampler is what it should be.

i am not totally sure about the mapping of image sampler type to
#[sampler(type)], i assumed:

```
    "filtering" => [ TextureSampleType::Float { filterable: true } ],
    "non_filtering" => [
        TextureSampleType::Float { filterable: false },
        TextureSampleType::Sint,
        TextureSampleType::Uint,
    ],
    "comparison" => [ TextureSampleType::Depth ],
```
2024-08-21 01:41:31 +00:00
..
mod.rs Fix UI texture atlas with offset (#13620) 2024-07-30 15:31:58 +00:00
pipeline.rs Add border radius to UI nodes (adopted) (#12500) 2024-03-19 22:44:00 +00:00
render_pass.rs Don't ignore draw errors (#13240) 2024-07-22 19:22:30 +00:00
ui_material_pipeline.rs check sampler type in as_bind_group derives (#12637) 2024-08-21 01:41:31 +00:00
ui_material.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
ui_vertex_output.wgsl Include UI node size in the vertex inputs for UiMaterial. (#11722) 2024-02-06 16:15:09 +00:00
ui.wgsl Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00