Renderer: Fix A8, L8 and LA8 support for both OpenGL and Vulkan

This commit is contained in:
Jérôme Leclercq
2021-09-07 17:39:12 +02:00
parent 601a0cedec
commit b6745b2906
3 changed files with 28 additions and 1 deletions

View File

@@ -249,6 +249,19 @@ namespace Nz
// TODO: Fill this switch
switch (pixelFormat)
{
case PixelFormat::A8:
{
createImage.format = VK_FORMAT_R8_UNORM;
createImageView.format = createImage.format;
createImageView.components = {
VK_COMPONENT_SWIZZLE_ONE,
VK_COMPONENT_SWIZZLE_ONE,
VK_COMPONENT_SWIZZLE_ONE,
VK_COMPONENT_SWIZZLE_R
};
break;
}
case PixelFormat::BGR8:
case PixelFormat::BGR8_SRGB:
case PixelFormat::BGRA8: