mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 00:32:46 +00:00
5af5222249
- https://github.com/KhronosGroup/SPIRV-Cross/commit/ 66a407285e36a0f772e3209cb86ded6e3d900f6a
27 lines
585 B
Plaintext
27 lines
585 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 v = mod(in_data[ident], out_data[ident]);
|
|
out_data[ident] = v;
|
|
|
|
uvec4 vu = floatBitsToUint(in_data[ident]) % floatBitsToUint(out_data[ident]);
|
|
out_data[ident] = uintBitsToFloat(vu);
|
|
|
|
ivec4 vi = floatBitsToInt(in_data[ident]) % floatBitsToInt(out_data[ident]);
|
|
out_data[ident] = intBitsToFloat(vi);
|
|
}
|
|
|