xref: /third_party/skia/resources/sksl/workarounds/AbsInt.sksl (revision cb93a386)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/skia/resources/sksl/workarounds/
1cb93a386Sopenharmony_ci/*#pragma settings EmulateAbsIntFunction*/
2cb93a386Sopenharmony_ci
3cb93a386Sopenharmony_ciuniform int ui;
4cb93a386Sopenharmony_ciuniform float uf;
5cb93a386Sopenharmony_ci
6cb93a386Sopenharmony_civoid main() {
7cb93a386Sopenharmony_ci    int i = abs(ui);
8cb93a386Sopenharmony_ci    float f = abs(uf);
9cb93a386Sopenharmony_ci    sk_FragColor.x = half(i);
10cb93a386Sopenharmony_ci    sk_FragColor.y = half(f);
11cb93a386Sopenharmony_ci}
12

Indexes created Thu Nov 07 10:32:03 CST 2024