SPIRV-Cross/reference/opt/shaders/comp/outer-product.comp

37 lines
792 B
Plaintext
Raw Normal View History

2019-07-01 08:57:27 +00:00
#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) writeonly buffer SSBO
{
mat2 m22;
mat2x3 m23;
mat2x4 m24;
mat3x2 m32;
mat3 m33;
mat3x4 m34;
mat4x2 m42;
mat4x3 m43;
mat4 m44;
} _21;
layout(binding = 1, std430) readonly buffer ReadSSBO
{
vec2 v2;
vec3 v3;
vec4 v4;
} _26;
void main()
{
_21.m22 = outerProduct(_26.v2, _26.v2);
_21.m23 = outerProduct(_26.v3, _26.v2);
_21.m24 = outerProduct(_26.v4, _26.v2);
_21.m32 = outerProduct(_26.v2, _26.v3);
_21.m33 = outerProduct(_26.v3, _26.v3);
_21.m34 = outerProduct(_26.v4, _26.v3);
_21.m42 = outerProduct(_26.v2, _26.v4);
_21.m43 = outerProduct(_26.v3, _26.v4);
_21.m44 = outerProduct(_26.v4, _26.v4);
}