cm: Use precomputed primaries conversion (#9814)

This commit is contained in:
UjinT34 2025-04-29 22:29:40 +03:00 committed by GitHub
parent 94bc132084
commit 49974d5e34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 164 additions and 136 deletions

View file

@ -11,7 +11,6 @@ uniform int texType; // eTextureType: 0 - rgba, 1 - rgbx, 2 - ext
// uniform int skipCM;
uniform int sourceTF; // eTransferFunction
uniform int targetTF; // eTransferFunction
uniform mat4x2 sourcePrimaries;
uniform mat4x2 targetPrimaries;
uniform float alpha;
@ -43,7 +42,7 @@ void main() {
discard;
// this shader shouldn't be used when skipCM == 1
pixColor = doColorManagement(pixColor, sourceTF, sourcePrimaries, targetTF, targetPrimaries);
pixColor = doColorManagement(pixColor, sourceTF, targetTF, targetPrimaries);
if (applyTint == 1)
pixColor = vec4(pixColor.rgb * tint.rgb, pixColor[3]);