Compare commits

...

2 Commits

Author SHA1 Message Date
Terry Jia
6df3aee425 Merge branch 'master' into fix/color-curves-shader-nested-sampler 2026-03-28 13:06:14 -04:00
Terry Jia
b4156b8a8c fix: avoid nested sampler function calls in Color Curves shader 2026-03-28 10:07:19 -04:00
2 changed files with 7 additions and 4 deletions

View File

@@ -38,9 +38,12 @@ void main() {
// GIMP order: per-channel curves first, then RGB master curve.
// See gimp_curve_map_pixels() default case in gimpcurve-map.c:
// dest = colors_curve( channel_curve( src ) )
color.r = applyCurve(u_curve0, applyCurve(u_curve1, color.r));
color.g = applyCurve(u_curve0, applyCurve(u_curve2, color.g));
color.b = applyCurve(u_curve0, applyCurve(u_curve3, color.b));
float tmp_r = applyCurve(u_curve1, color.r);
float tmp_g = applyCurve(u_curve2, color.g);
float tmp_b = applyCurve(u_curve3, color.b);
color.r = applyCurve(u_curve0, tmp_r);
color.g = applyCurve(u_curve0, tmp_g);
color.b = applyCurve(u_curve0, tmp_b);
fragColor0 = vec4(color.rgb, color.a);
}

File diff suppressed because one or more lines are too long