comp: Clamp UV textures to a black border

This commit is contained in:
Jakob Bornecrantz 2019-10-10 11:24:45 +01:00
parent 898c1b4a9f
commit fafbe287e1

View file

@ -362,9 +362,9 @@ vk_create_sampler(struct vk_bundle *vk, VkSampler *out_sampler)
.magFilter = VK_FILTER_LINEAR,
.minFilter = VK_FILTER_LINEAR,
.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR,
.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
.mipLodBias = 0.0f,
.anisotropyEnable = VK_FALSE,
.maxAnisotropy = 1.0f,
@ -372,7 +372,7 @@ vk_create_sampler(struct vk_bundle *vk, VkSampler *out_sampler)
.compareOp = VK_COMPARE_OP_NEVER,
.minLod = 0.0f,
.maxLod = 1.0f,
.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE,
.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK,
.unnormalizedCoordinates = VK_FALSE,
};