2022-11-23 19:57:00 +00:00
|
|
|
struct frexp_result_vec2_f32 {
|
2022-11-23 18:21:38 +00:00
|
|
|
float2 fract;
|
|
|
|
int2 exp;
|
|
|
|
};
|
2022-11-23 19:57:00 +00:00
|
|
|
frexp_result_vec2_f32 tint_frexp(float2 param_0) {
|
2022-11-23 18:21:38 +00:00
|
|
|
float2 exp;
|
|
|
|
float2 fract = frexp(param_0, exp);
|
2022-11-23 19:57:00 +00:00
|
|
|
frexp_result_vec2_f32 result = {fract, int2(exp)};
|
2022-11-23 18:21:38 +00:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void main() {
|
|
|
|
const float2 runtime_in = float2(1.25f, 3.75f);
|
2022-11-23 19:57:00 +00:00
|
|
|
frexp_result_vec2_f32 res = {float2(0.625f, 0.9375f), int2(1, 2)};
|
2022-11-23 18:21:38 +00:00
|
|
|
res = tint_frexp(runtime_in);
|
2022-11-23 19:57:00 +00:00
|
|
|
const frexp_result_vec2_f32 c = {float2(0.625f, 0.9375f), int2(1, 2)};
|
2022-11-23 18:21:38 +00:00
|
|
|
res = c;
|
|
|
|
const float2 fract = res.fract;
|
|
|
|
const int2 exp = res.exp;
|
|
|
|
return;
|
|
|
|
}
|