parent
2027f84d45
commit
60721b71e1
1 changed files with 4 additions and 4 deletions
|
|
@ -340,8 +340,8 @@ namespace vks
|
||||||
samplerCreateInfo.minLod = 0.0f;
|
samplerCreateInfo.minLod = 0.0f;
|
||||||
// Max level-of-detail should match mip level count
|
// Max level-of-detail should match mip level count
|
||||||
samplerCreateInfo.maxLod = (useStaging) ? (float)mipLevels : 0.0f;
|
samplerCreateInfo.maxLod = (useStaging) ? (float)mipLevels : 0.0f;
|
||||||
// Enable anisotropic filtering
|
// Only enable anisotropic filtering if enabled on the devicec
|
||||||
samplerCreateInfo.maxAnisotropy = 8;
|
samplerCreateInfo.maxAnisotropy = device->enabledFeatures.samplerAnisotropy ? device->properties.limits.maxSamplerAnisotropy : 1.0f;
|
||||||
samplerCreateInfo.anisotropyEnable = VK_TRUE;
|
samplerCreateInfo.anisotropyEnable = VK_TRUE;
|
||||||
samplerCreateInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
samplerCreateInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;
|
||||||
VK_CHECK_RESULT(vkCreateSampler(device->logicalDevice, &samplerCreateInfo, nullptr, &sampler));
|
VK_CHECK_RESULT(vkCreateSampler(device->logicalDevice, &samplerCreateInfo, nullptr, &sampler));
|
||||||
|
|
@ -726,7 +726,7 @@ namespace vks
|
||||||
samplerCreateInfo.addressModeV = samplerCreateInfo.addressModeU;
|
samplerCreateInfo.addressModeV = samplerCreateInfo.addressModeU;
|
||||||
samplerCreateInfo.addressModeW = samplerCreateInfo.addressModeU;
|
samplerCreateInfo.addressModeW = samplerCreateInfo.addressModeU;
|
||||||
samplerCreateInfo.mipLodBias = 0.0f;
|
samplerCreateInfo.mipLodBias = 0.0f;
|
||||||
samplerCreateInfo.maxAnisotropy = 8;
|
samplerCreateInfo.maxAnisotropy = device->enabledFeatures.samplerAnisotropy ? device->properties.limits.maxSamplerAnisotropy : 1.0f;
|
||||||
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
||||||
samplerCreateInfo.minLod = 0.0f;
|
samplerCreateInfo.minLod = 0.0f;
|
||||||
samplerCreateInfo.maxLod = (float)mipLevels;
|
samplerCreateInfo.maxLod = (float)mipLevels;
|
||||||
|
|
@ -938,7 +938,7 @@ namespace vks
|
||||||
samplerCreateInfo.addressModeV = samplerCreateInfo.addressModeU;
|
samplerCreateInfo.addressModeV = samplerCreateInfo.addressModeU;
|
||||||
samplerCreateInfo.addressModeW = samplerCreateInfo.addressModeU;
|
samplerCreateInfo.addressModeW = samplerCreateInfo.addressModeU;
|
||||||
samplerCreateInfo.mipLodBias = 0.0f;
|
samplerCreateInfo.mipLodBias = 0.0f;
|
||||||
samplerCreateInfo.maxAnisotropy = 8;
|
samplerCreateInfo.maxAnisotropy = device->enabledFeatures.samplerAnisotropy ? device->properties.limits.maxSamplerAnisotropy : 1.0f;
|
||||||
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER;
|
||||||
samplerCreateInfo.minLod = 0.0f;
|
samplerCreateInfo.minLod = 0.0f;
|
||||||
samplerCreateInfo.maxLod = (float)mipLevels;
|
samplerCreateInfo.maxLod = (float)mipLevels;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue