parent
e365faf2b6
commit
33870e46e3
1 changed files with 1 additions and 2 deletions
|
|
@ -789,10 +789,9 @@ public:
|
|||
file << "P6\n" << width << "\n" << height << "\n" << 255 << "\n";
|
||||
|
||||
// If source is BGR (destination is always RGB) and we can't use blit (which does automatic conversion), we'll have to manually swizzle color components
|
||||
bool colorSwizzle = false;
|
||||
// Check if source is BGR and needs swizzle
|
||||
std::vector<VkFormat> formatsBGR = { VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SNORM };
|
||||
colorSwizzle = (std::find(formatsBGR.begin(), formatsBGR.end(), VK_FORMAT_R8G8B8A8_UNORM) != formatsBGR.end());
|
||||
const bool colorSwizzle = (std::find(formatsBGR.begin(), formatsBGR.end(), VK_FORMAT_R8G8B8A8_UNORM) != formatsBGR.end());
|
||||
|
||||
// ppm binary pixel data
|
||||
for (int32_t y = 0; y < height; y++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue