depth, normals i guess

This commit is contained in:
2026-02-19 22:06:21 +02:00
parent 4dd2e13c48
commit 04b0f02e7f
18 changed files with 129 additions and 55 deletions

View File

@@ -120,6 +120,21 @@ VkFormat CVkImage::GetImageFormat( enum EImageFormat eImageFormat )
}
}
VkSampleCountFlagBits CVkImage::GetMultisampling( enum EMultisampleType eImageFormat )
{
switch ( eImageFormat )
{
case MULTISAMPLE_TYPE_1_SAMPLES:
return VK_SAMPLE_COUNT_1_BIT;
case MULTISAMPLE_TYPE_2_SAMPLES:
return VK_SAMPLE_COUNT_2_BIT;
case MULTISAMPLE_TYPE_4_SAMPLES:
return VK_SAMPLE_COUNT_4_BIT;
case MULTISAMPLE_TYPE_8_SAMPLES:
return VK_SAMPLE_COUNT_8_BIT;
}
}
void CVkImage::CreateImage( uint32_t nWidth, uint32_t nHeight, EImageFormat eFormat, EMultisampleType eMultisampleType, VkImageUsageFlagBits eUsage )
{
VkImageCreateInfo stCreateInfo = {};
@@ -135,7 +150,7 @@ void CVkImage::CreateImage( uint32_t nWidth, uint32_t nHeight, EImageFormat eFor
stCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
stCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
stCreateInfo.format = GetImageFormat(eFormat);
stCreateInfo.samples = VK_SAMPLE_COUNT_1_BIT;
stCreateInfo.samples = GetMultisampling(eMultisampleType);
stAlloc.usage = VMA_MEMORY_USAGE_AUTO;