mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
vulkan: fix depth texture compare mode setting.
This commit is contained in:
@@ -2598,14 +2598,14 @@ VkSampler Graphics::createSampler(const SamplerState &samplerState)
|
|||||||
if (samplerState.depthSampleMode.hasValue)
|
if (samplerState.depthSampleMode.hasValue)
|
||||||
{
|
{
|
||||||
samplerInfo.compareEnable = VK_TRUE;
|
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
|
else
|
||||||
{
|
{
|
||||||
samplerInfo.compareEnable = VK_FALSE;
|
samplerInfo.compareEnable = VK_FALSE;
|
||||||
samplerInfo.compareOp = VK_COMPARE_OP_ALWAYS;
|
samplerInfo.compareOp = VK_COMPARE_OP_ALWAYS;
|
||||||
}
|
}
|
||||||
samplerInfo.compareEnable = VK_FALSE;
|
|
||||||
samplerInfo.mipmapMode = Vulkan::getMipMapMode(samplerState.mipmapFilter);
|
samplerInfo.mipmapMode = Vulkan::getMipMapMode(samplerState.mipmapFilter);
|
||||||
samplerInfo.mipLodBias = samplerState.lodBias;
|
samplerInfo.mipLodBias = samplerState.lodBias;
|
||||||
samplerInfo.minLod = static_cast<float>(samplerState.minLod);
|
samplerInfo.minLod = static_cast<float>(samplerState.minLod);
|
||||||
|
|||||||
Reference in New Issue
Block a user