mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-28 05:55:19 -06:00
Respect minification selection
Undoes previous change where it would always use linear, like OpenGL does for DrawBackBuffer. This allows GetDefaultTextureSampler to remain somewhat generic, even though it's only used for DrawBackBufferQuad right now.
This commit is contained in:
parent
becdd55096
commit
21899d13ab
@ -202,9 +202,9 @@ VkSampler LatteTextureViewVk::GetDefaultTextureSampler(bool useLinearTexFilter)
|
||||
VkSamplerCreateInfo samplerInfo{};
|
||||
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
|
||||
|
||||
// emulate OpenGL linear minFilter
|
||||
// emulate OpenGL minFilters
|
||||
// see note under: https://docs.vulkan.org/spec/latest/chapters/samplers.html#VkSamplerCreateInfo
|
||||
samplerInfo.minFilter = VK_FILTER_LINEAR;
|
||||
// if maxLod = 0 then magnification is always performed
|
||||
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
|
||||
samplerInfo.minLod = 0.0f;
|
||||
samplerInfo.maxLod = 0.25f;
|
||||
@ -212,10 +212,12 @@ VkSampler LatteTextureViewVk::GetDefaultTextureSampler(bool useLinearTexFilter)
|
||||
if (useLinearTexFilter)
|
||||
{
|
||||
samplerInfo.magFilter = VK_FILTER_LINEAR;
|
||||
samplerInfo.minFilter = VK_FILTER_LINEAR;
|
||||
}
|
||||
else
|
||||
{
|
||||
samplerInfo.magFilter = VK_FILTER_NEAREST;
|
||||
samplerInfo.minFilter = VK_FILTER_NEAREST;
|
||||
}
|
||||
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||
samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user