SPIRV-Cross/reference/shaders/asm/comp/quantize.asm.comp
2016-05-31 16:56:15 +02:00

20 lines
584 B
Plaintext

#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) buffer SSBO0
{
float scalar;
vec2 vec2_val;
vec3 vec3_val;
vec4 vec4_val;
} _4;
void main()
{
_4.scalar = unpackHalf2x16(packHalf2x16(vec2(_4.scalar))).x;
_4.vec2_val = unpackHalf2x16(packHalf2x16(_4.vec2_val));
_4.vec3_val = vec3(unpackHalf2x16(packHalf2x16(_4.vec3_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec3_val.zz)).x);
_4.vec4_val = vec4(unpackHalf2x16(packHalf2x16(_4.vec4_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec4_val.zw)));
}