2023-03-27 18:55:25 +00:00
|
|
|
float tint_trunc(float param_0) {
|
|
|
|
return param_0 < 0 ? ceil(param_0) : floor(param_0);
|
|
|
|
}
|
|
|
|
|
2023-02-14 16:12:59 +00:00
|
|
|
float tint_float_mod(float lhs, float rhs) {
|
2023-03-27 18:55:25 +00:00
|
|
|
return (lhs - (tint_trunc((lhs / rhs)) * rhs));
|
2023-02-14 16:12:59 +00:00
|
|
|
}
|
|
|
|
|
2021-07-17 17:38:46 +00:00
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void f() {
|
2022-09-19 14:05:21 +00:00
|
|
|
const float a = 1.0f;
|
|
|
|
const float b = 2.0f;
|
2023-02-14 16:12:59 +00:00
|
|
|
const float r = tint_float_mod(a, b);
|
2021-07-17 17:38:46 +00:00
|
|
|
return;
|
|
|
|
}
|