MacOS: Enable support for EDR rendering #105662
|
@ -169,7 +169,8 @@ vec4 OCIO_ProcessColor(vec4 col, vec4 col_overlay)
|
|||
* merge UI using alpha blending in the correct color space. */
|
||||
if (parameters.use_overlay) {
|
||||
col.rgb = pow(col.rgb, vec3(parameters.exponent * 2.2));
|
||||
vec4 clamped_col = clamp(col, 0.0, 1.0);
|
||||
col = max(col, 0.0);
|
||||
vec4 clamped_col = min(col, 1.0);
|
||||
brecht marked this conversation as resolved
Outdated
|
||||
|
||||
if (!parameters.use_extended) {
|
||||
/* if we're not using an extended colour space, clamp the color 0..1 */
|
||||
fclem marked this conversation as resolved
Outdated
Clément Foucault
commented
Comment style: Capital + fullstop. Comment style: Capital + fullstop.
|
||||
|
|
|
@ -36,7 +36,8 @@ void main()
|
|||
vec4 overlay_col = texture(overlays_texture, texCoord_interp.xy);
|
||||
|
||||
if (overlay) {
|
||||
vec4 clamped_col = clamp(fragColor, 0.0, 1.0);
|
||||
fragColor = max(fragColor, 0.0);
|
||||
brecht marked this conversation as resolved
Outdated
Jeroen Bakker
commented
Same here as in the OCIO shader. Same here as in the OCIO shader.
|
||||
vec4 clamped_col = min(fragColor, 1.0);
|
||||
if (!use_extended) {
|
||||
/* Only clamp color if we are not using an extended display colorspace. */
|
||||
fragColor = clamped_col;
|
||||
|
|
Loading…
Reference in New Issue
would still use
clamp(col, 0.0, 1.0)
here. and move themax
inside the else-clauseAs would even go further and suggest to move all clamping inside the if-else clause for clarity.
This way, the code is easier to refactor if we need to change the else clause.