mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 22:18:28 +00:00
Make sure we actually have an HDR10 texture in the HDR10 shader
Some content uses the PQ transfer function but different color primaries
This commit is contained in:
@@ -2201,8 +2201,7 @@ static void D3D11_SetupShaderConstants(SDL_Renderer *renderer, const SDL_RenderC
|
||||
constants->texture_type = TEXTURETYPE_RGB;
|
||||
if (texture->colorspace == SDL_COLORSPACE_SRGB_LINEAR) {
|
||||
constants->input_type = INPUTTYPE_SCRGB;
|
||||
} else if (SDL_COLORSPACEPRIMARIES(texture->colorspace) == SDL_COLOR_PRIMARIES_BT2020 &&
|
||||
SDL_COLORSPACETRANSFER(texture->colorspace) == SDL_TRANSFER_CHARACTERISTICS_PQ) {
|
||||
} else if (texture->colorspace == SDL_COLORSPACE_HDR10) {
|
||||
constants->input_type = INPUTTYPE_HDR10;
|
||||
} else {
|
||||
constants->input_type = INPUTTYPE_UNSPECIFIED;
|
||||
|
Reference in New Issue
Block a user