skia2/resources/sksl/intrinsics/Log.sksl

15 lines
576 B
Plaintext
Raw Normal View History

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