| 1 |
#version 450 core |
| 2 |
#extension GL_AMD_gpu_shader_half_float : require |
| 3 |
#extension GL_AMD_gpu_shader_int16 : require |
| 4 |
layout(local_size_x = 1) in; |
| 5 |
|
| 6 |
layout(binding = 0, std430) buffer SSBO0 |
| 7 |
{ |
| 8 |
ivec4 inputs[]; |
| 9 |
}; |
| 10 |
|
| 11 |
layout(binding = 1, std430) buffer SSBO1 |
| 12 |
{ |
| 13 |
i16vec4 outputs[]; |
| 14 |
}; |
| 15 |
|
| 16 |
layout(binding = 2) uniform UBO |
| 17 |
{ |
| 18 |
f16vec4 const0; |
| 19 |
}; |
| 20 |
|
| 21 |
void main() |
| 22 |
{ |
| 23 |
uint ident = gl_GlobalInvocationID.x; |
| 24 |
outputs[ident].xy = unpackInt2x16(inputs[ident].x) + float16BitsToInt16(const0.xy); |
| 25 |
outputs[ident].zw = i16vec2(unpackUint2x16(uint(inputs[ident].y)) - float16BitsToUint16(const0.zw)); |
| 26 |
} |