bfc9be0f77
This will allow us to load these inputs for unit testing in `dm`. Change-Id: Id256ba7c30d3ec94b98048e47af44cf9efe580d5 Bug: skia:11009 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357282 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
22 lines
408 B
Plaintext
22 lines
408 B
Plaintext
uniform half4 color;
|
|
|
|
half add(half a, half b) {
|
|
half c = a + b;
|
|
return c;
|
|
}
|
|
|
|
half mul(half a, half b) {
|
|
return a * b;
|
|
}
|
|
|
|
half fma(half a, half b, half c) {
|
|
return add(mul(a, b), c);
|
|
}
|
|
|
|
half4 main() {
|
|
half a = fma(color.x, color.y, color.z);
|
|
half b = fma(color.y, color.z, color.w);
|
|
half c = fma(color.z, color.w, color.x);
|
|
return half4(a, b, mul(c, c), mul(a, mul(b, c)));
|
|
}
|