mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
vulkan: fix colors
This commit is contained in:
@@ -1014,7 +1014,8 @@ namespace love {
|
|||||||
|
|
||||||
VkSurfaceFormatKHR Graphics::chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats) {
|
VkSurfaceFormatKHR Graphics::chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats) {
|
||||||
for (const auto& availableFormat : availableFormats) {
|
for (const auto& availableFormat : availableFormats) {
|
||||||
if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
|
// fixme: what if this format and colorspace is not available?
|
||||||
|
if (availableFormat.format == VK_FORMAT_B8G8R8A8_UNORM && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
|
||||||
return availableFormat;
|
return availableFormat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ namespace love {
|
|||||||
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_UINT;
|
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_UINT;
|
||||||
break;
|
break;
|
||||||
case PIXELFORMAT_RGBA8_UNORM:
|
case PIXELFORMAT_RGBA8_UNORM:
|
||||||
textureFormat.internalFormat = VK_FORMAT_R8G8B8A8_SRGB; // fixme?
|
textureFormat.internalFormat = VK_FORMAT_R8G8B8A8_UNORM;
|
||||||
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_FLOAT;
|
textureFormat.internalFormatRepresentation = FORMATREPRESENTATION_FLOAT;
|
||||||
break;
|
break;
|
||||||
case PIXELFORMAT_RGBA8_UNORM_sRGB:
|
case PIXELFORMAT_RGBA8_UNORM_sRGB:
|
||||||
|
|||||||
Reference in New Issue
Block a user