shaders: Fix primaries for scRGB content
Need to go from 709 -> 2020.
This commit is contained in:
parent
1e9ccbd05c
commit
a1bff9fc70
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ vec4 sampleLayer(sampler2D layerSampler, uint layerIdx, vec2 uv, bool unnormaliz
|
|||
// scRGB is rec709.
|
||||
color.rgb = nitsToLinear(color.rgb);
|
||||
color.rgb = tonemap(color.rgb);
|
||||
} else {
|
||||
// scRGB is rec709.
|
||||
// ST2084 output needs rec2020.
|
||||
color.rgb = convert_primaries(color.rgb, rec709_to_xyz, xyz_to_rec2020);
|
||||
}
|
||||
}
|
||||
} else if (get_layer_colorspace(layerIdx) == colorspace_sRGB) {
|
||||
|
|
Loading…
Reference in a new issue