Skip to content

Commit 4dbaa86

Browse files
Fixed maxLod calculation bug
1 parent fe57f92 commit 4dbaa86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lvk/vulkan/VulkanUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ VkSamplerCreateInfo lvk::samplerStateDescToVkSamplerCreateInfo(const lvk::Sample
546546
.compareEnable = desc.depthCompareEnabled ? VK_TRUE : VK_FALSE,
547547
.compareOp = desc.depthCompareEnabled ? lvk::compareOpToVkCompareOp(desc.depthCompareOp) : VK_COMPARE_OP_ALWAYS,
548548
.minLod = float(desc.mipLodMin),
549-
.maxLod = desc.mipMap == lvk::SamplerMip_Disabled ? 0.0f : float(desc.mipLodMax),
549+
.maxLod = desc.mipMap == lvk::SamplerMip_Disabled ? float(desc.mipLodMin) : float(desc.mipLodMax),
550550
.borderColor = VK_BORDER_COLOR_INT_OPAQUE_BLACK,
551551
.unnormalizedCoordinates = VK_FALSE,
552552
};

0 commit comments

Comments
 (0)