SPIRV-Cross/shaders/comp/modf.comp

24 lines
411 B
Plaintext
Raw Normal View History

2016-03-02 17:09:16 +00:00
#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;
}