I sample a texture (its format is vk::Format::eR8G8B8A8Unorm) beyond the image with "clamp to border" and set the border color to be opaque white. But the rendered border color I get is always black ,and I can't find why.
Here are the sampler settings that are relevant :
vk::SamplerCreateInfo samplerInfo = {};
samplerInfo.addressModeU = vk::SamplerAddressMode::eClampToBorder;
samplerInfo.addressModeV = vk::SamplerAddressMode::eClampToBorder;
samplerInfo.addressModeW = vk::SamplerAddressMode::eClampToBorder;
samplerInfo.borderColor = vk::BorderColor::eIntOpaqueWhite;
I checked with other type of addressing modes: vk::SamplerAddressMode::eRepeat, vk::SamplerAddressMode::eMirroredRepeat, and vk::SamplerAddressMode::eClampToEdge and they all work correctly.
I replaced vk::BorderColor::eIntOpaqueWhite with vk::BorderColor::eFloatOpaqueWhite and then I got the white color - but it is strange, because if the texture format is vk::Format::eR8G8B8A8Unorm I would expect that the needed flag is the integer form - vk::BorderColor::eIntOpaqueWhite as explained here : https://vulkan-tutorial.com/Texture_mapping/Image_view_and_sampler ?
Thanks