From e2254b1045dfa9d164b8baad360a75d3bb89d92a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 20 Oct 2024 18:37:21 -0700 Subject: [PATCH] Added color scale info for the GPU renderer TODO item --- src/render/gpu/SDL_render_gpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/gpu/SDL_render_gpu.c b/src/render/gpu/SDL_render_gpu.c index 1ecc0ae97..c36784ce9 100644 --- a/src/render/gpu/SDL_render_gpu.c +++ b/src/render/gpu/SDL_render_gpu.c @@ -432,6 +432,7 @@ static bool GPU_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SD } // FIXME: The Vulkan backend doesn't multiply by color_scale. GL does. I'm not sure which one is wrong. + // ANSWER: The color scale should be applied in linear space when using the scRGB colorspace. This is done in shaders in the Vulkan backend. *(verts++) = col_.r * color_scale; *(verts++) = col_.g * color_scale; *(verts++) = col_.b * color_scale;