Skip to content

Commit

Permalink
vulkan: fix depth texture compare mode setting.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Jul 12, 2024
1 parent af35953 commit 6acdd5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/graphics/vulkan/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2598,14 +2598,14 @@ VkSampler Graphics::createSampler(const SamplerState &samplerState)
if (samplerState.depthSampleMode.hasValue)
{
samplerInfo.compareEnable = VK_TRUE;
samplerInfo.compareOp = Vulkan::getCompareOp(samplerState.depthSampleMode.value);
// See the comment in renderstate.h
samplerInfo.compareOp = Vulkan::getCompareOp(getReversedCompareMode(samplerState.depthSampleMode.value));
}
else
{
samplerInfo.compareEnable = VK_FALSE;
samplerInfo.compareOp = VK_COMPARE_OP_ALWAYS;
}
samplerInfo.compareEnable = VK_FALSE;
samplerInfo.mipmapMode = Vulkan::getMipMapMode(samplerState.mipmapFilter);
samplerInfo.mipLodBias = samplerState.lodBias;
samplerInfo.minLod = static_cast<float>(samplerState.minLod);
Expand Down

0 comments on commit 6acdd5f

Please sign in to comment.