Proper image layout in descriptor, enable anisotropic filtering (refs #277)
This commit is contained in:
parent
0b8484b21d
commit
aa20f2aa26
1 changed files with 10 additions and 2 deletions
|
|
@ -217,6 +217,15 @@ public:
|
||||||
textures.ssaoNoise.destroy();
|
textures.ssaoNoise.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void getEnabledFeatures()
|
||||||
|
{
|
||||||
|
// Enable anisotropic filtering if supported
|
||||||
|
if (deviceFeatures.samplerAnisotropy) {
|
||||||
|
enabledFeatures.samplerAnisotropy = VK_TRUE;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create a frame buffer attachment
|
// Create a frame buffer attachment
|
||||||
void createAttachment(
|
void createAttachment(
|
||||||
VkFormat format,
|
VkFormat format,
|
||||||
|
|
@ -811,9 +820,8 @@ public:
|
||||||
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &pipelineLayouts.ssaoBlur));
|
VK_CHECK_RESULT(vkCreatePipelineLayout(device, &pipelineLayoutCreateInfo, nullptr, &pipelineLayouts.ssaoBlur));
|
||||||
descriptorAllocInfo.pSetLayouts = &descriptorSetLayouts.ssaoBlur;
|
descriptorAllocInfo.pSetLayouts = &descriptorSetLayouts.ssaoBlur;
|
||||||
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorAllocInfo, &descriptorSets.ssaoBlur));
|
VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorAllocInfo, &descriptorSets.ssaoBlur));
|
||||||
// todo
|
|
||||||
imageDescriptors = {
|
imageDescriptors = {
|
||||||
vks::initializers::descriptorImageInfo(colorSampler, frameBuffers.ssao.color.view, VK_IMAGE_LAYOUT_GENERAL),
|
vks::initializers::descriptorImageInfo(colorSampler, frameBuffers.ssao.color.view, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL),
|
||||||
};
|
};
|
||||||
writeDescriptorSets = {
|
writeDescriptorSets = {
|
||||||
vks::initializers::writeDescriptorSet(descriptorSets.ssaoBlur, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 0, &imageDescriptors[0]),
|
vks::initializers::writeDescriptorSet(descriptorSets.ssaoBlur, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 0, &imageDescriptors[0]),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue