xref: /aosp_15_r20/external/skia/resources/sksl/runtime/ColorConversion.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform shader child;
2
3half4 main(float2 xy) {
4    half4 color = child.eval(xy);
5    color.rgb = toLinearSrgb(color.rgb);
6
7    // Alter the color so that the back-and-forth conversions are meaningful.
8    color.br = color.rb * 0.75;
9
10    return half4(fromLinearSrgb(color.rgb), color.a);
11}
12