1049d82061
This adds sinh, cosh, tanh, asinh, acosh, and atanh. We now also support compile-time optimization for the arc functions. Change-Id: I688f579b50403db534622b82926aa20d1f445341 Bug: skia:12202 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439319 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
15 lines
648 B
Plaintext
15 lines
648 B
Plaintext
uniform half4 input, expected;
|
|
uniform half4 colorGreen, colorRed;
|
|
|
|
half4 main(float2 coords) {
|
|
const half4 constVal1 = half4(0, 0, 1.1752011936438014568, -1.1752011936438014568);
|
|
return (asinh(input.x) == expected.x &&
|
|
asinh(input.xy) == expected.xy &&
|
|
asinh(input.xyz) == expected.xyz &&
|
|
asinh(input.xyzw) == expected.xyzw &&
|
|
asinh(constVal1.x) == expected.x &&
|
|
asinh(constVal1.xy) == expected.xy &&
|
|
asinh(constVal1.xyz) == expected.xyz &&
|
|
asinh(constVal1.xyzw) == expected.xyzw) ? colorGreen : colorRed;
|
|
}
|