24 lines
411 B
Plaintext
24 lines
411 B
Plaintext
#version 310 es
|
|
layout(local_size_x = 1) in;
|
|
|
|
layout(std430, binding = 0) readonly buffer SSBO
|
|
{
|
|
vec4 in_data[];
|
|
};
|
|
|
|
layout(std430, binding = 1) writeonly buffer SSBO2
|
|
{
|
|
vec4 out_data[];
|
|
};
|
|
|
|
void main()
|
|
{
|
|
uint ident = gl_GlobalInvocationID.x;
|
|
vec4 i;
|
|
//vec4 v = frexp(in_data[ident], i);
|
|
//out_data[ident] = ldexp(v, i);
|
|
vec4 v = modf(in_data[ident], i);
|
|
out_data[ident] = v;
|
|
}
|
|
|