android13/external/skia/resources/sksl/intrinsics/Tanh.sksl

15 lines
584 B
Plaintext

uniform half4 inputVal, expected;
uniform half4 colorGreen, colorRed;
half4 main(float2 coords) {
const half4 constVal = half4(0);
return (tanh(inputVal.x) == expected.x &&
tanh(inputVal.xy) == expected.xy &&
tanh(inputVal.xyz) == expected.xyz &&
tanh(inputVal.xyzw) == expected.xyzw &&
tanh(constVal.x) == expected.x &&
tanh(constVal.xy) == expected.xy &&
tanh(constVal.xyz) == expected.xyz &&
tanh(constVal.xyzw) == expected.xyzw) ? colorGreen : colorRed;
}