Define SCRGB_NITS for use in HDR color calculations

This commit is contained in:
Sam Lantinga
2026-07-23 08:09:02 -07:00
parent b9d64c45a9
commit 148241117b
7 changed files with 20 additions and 14 deletions

View File

@@ -4166,9 +4166,9 @@ static bool VULKAN_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cm
color.b *= cmd->data.color.color_scale;
if (renderer->current_colorspace == SDL_COLORSPACE_HDR10) {
color.r = SDL_PQfromNits(color.r * 80.0f);
color.g = SDL_PQfromNits(color.g * 80.0f);
color.b = SDL_PQfromNits(color.b * 80.0f);
color.r = SDL_PQfromNits(color.r * SCRGB_NITS);
color.g = SDL_PQfromNits(color.g * SCRGB_NITS);
color.b = SDL_PQfromNits(color.b * SCRGB_NITS);
}
VkClearColorValue clearColor;