2023-03-27 18:55:25 +00:00
|
|
|
float3 tint_trunc(float3 param_0) {
|
|
|
|
return param_0 < 0 ? ceil(param_0) : floor(param_0);
|
|
|
|
}
|
|
|
|
|
2023-02-14 16:12:59 +00:00
|
|
|
float3 tint_float_mod(float3 lhs, float3 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() {
|
|
|
|
const float3 a = float3(1.0f, 2.0f, 3.0f);
|
|
|
|
const float3 b = float3(4.0f, 5.0f, 6.0f);
|
2023-02-14 16:12:59 +00:00
|
|
|
const float3 r = tint_float_mod(a, b);
|
2021-07-17 17:38:46 +00:00
|
|
|
return;
|
|
|
|
}
|