mirror of
https://github.com/bevyengine/bevy
synced 2024-12-23 03:23:20 +00:00
6e2f96f222
# 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 ], ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |