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, float rhs) {
|
|
|
|
const float3 r = float3((rhs).xxx);
|
2023-03-27 18:55:25 +00:00
|
|
|
return (lhs - (tint_trunc((lhs / r)) * r));
|
2023-02-14 16:12:59 +00:00
|
|
|
}
|
|
|
|
|
2022-03-28 14:36:31 +00:00
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void f() {
|
|
|
|
const float3 a = float3(1.0f, 2.0f, 3.0f);
|
2022-09-19 14:05:21 +00:00
|
|
|
const float b = 4.0f;
|
2023-02-14 16:12:59 +00:00
|
|
|
const float3 r = tint_float_mod(a, b);
|
2022-03-28 14:36:31 +00:00
|
|
|
return;
|
|
|
|
}
|