Skip to content

Commit

Permalink
Added color scale info for the GPU renderer TODO item
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 21, 2024
1 parent 533f370 commit 86bd694
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/gpu/SDL_render_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86bd694

Please sign in to comment.