![]() # 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 ], ``` |
||
---|---|---|
.. | ||
layout | ||
render | ||
widget | ||
accessibility.rs | ||
focus.rs | ||
geometry.rs | ||
lib.rs | ||
measurement.rs | ||
node_bundles.rs | ||
picking_backend.rs | ||
stack.rs | ||
texture_slice.rs | ||
ui_material.rs | ||
ui_node.rs | ||
update.rs |