main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
Showing only changes of commit 0b68e609fc - Show all commits

View File

@ -8,7 +8,7 @@ void node_composite_luminance_matte(vec4 color,
out float matte) out float matte)
{ {
float luminance = get_luminance(color.rgb, luminance_coefficients); float luminance = get_luminance(color.rgb, luminance_coefficients);
float alpha = clamp(0.0, 1.0, (luminance - low) / (high - low)); float alpha = clamp((luminance - low) / (high - low), 0.0, 1.0);
matte = min(alpha, color.a); matte = min(alpha, color.a);
result = color * matte; result = color * matte;
} }