depth, normals i guess
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user