38 lines
596 B
Plaintext
38 lines
596 B
Plaintext
#version 450
|
|
layout(local_size_x = 1) in;
|
|
|
|
layout(set = 0, binding = 0, std430) writeonly buffer SSBO
|
|
{
|
|
mat2 m22;
|
|
mat2x3 m23;
|
|
mat2x4 m24;
|
|
mat3x2 m32;
|
|
mat3 m33;
|
|
mat3x4 m34;
|
|
mat4x2 m42;
|
|
mat4x3 m43;
|
|
mat4 m44;
|
|
};
|
|
|
|
layout(set = 0, binding = 1, std430) readonly buffer ReadSSBO
|
|
{
|
|
vec2 v2;
|
|
vec3 v3;
|
|
vec4 v4;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
m22 = outerProduct(v2, v2);
|
|
m23 = outerProduct(v3, v2);
|
|
m24 = outerProduct(v4, v2);
|
|
|
|
m32 = outerProduct(v2, v3);
|
|
m33 = outerProduct(v3, v3);
|
|
m34 = outerProduct(v4, v3);
|
|
|
|
m42 = outerProduct(v2, v4);
|
|
m43 = outerProduct(v3, v4);
|
|
m44 = outerProduct(v4, v4);
|
|
}
|