skia2/resources/sksl/workarounds/AbsInt.sksl

12 lines
199 B
Plaintext
Raw Normal View History

/*#pragma settings EmulateAbsIntFunction*/
uniform int ui;
uniform float uf;
void main() {
int i = abs(ui);
float f = abs(uf);
sk_FragColor.x = half(i);
sk_FragColor.y = half(f);
}