#Using bool and/or Option<_> in a struct passed to a shader
3 messages · Page 1 of 1 (latest)
The reason unloaded textures appear white is because of the fallback image, which is a renderapp resource. I don't think you'll be able to tell if your texture is there or not just by the pixel value, unless you're certain that your textures are never white.
it's probably the best route to just use the u32 since most gpu pipelining doesn't really support small types like this because they just get padded to 32 bits or some other SIMD width anyways. if the material.has_texture == 1u makes you nervous you can use the wgpu built-in bool(material.has_texture), but gpu crates that don't already support small types are unlikely to change because of the padding.
thanks for the help, i didn't realise that small types weren't supported like that😅