pub fn select_surface_format(
supported_formats: &[TextureFormat],
prefer_hdr: bool,
) -> SurfaceColorFormatExpand description
Choose the best format from supported_formats given a preference.
When prefer_hdr is true, Rgba16Float is preferred if available.
Otherwise, sRGB variants are preferred over linear unorm (for correct gamma
on standard SDR displays). Falls back to the first format in the list, or
SurfaceColorFormat::Rgba8Unorm if the list is empty.