MacOS: Enable support for EDR rendering #105662

Merged
Brecht Van Lommel merged 26 commits from Jason-Fielder/blender:macos_EDR_support into main 2023-08-09 14:25:23 +02:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 66326f431f - Show all commits

View File

@ -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);
if (!parameters.use_extended) {
/* if we're not using an extended colour space, clamp the color 0..1 */

View File

@ -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);
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;