SPIRV-Cross/shaders-msl/comp/mat3-row-maj-read-write-const.comp

18 lines
467 B
Plaintext
Raw Normal View History

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(set = 0, binding = 1, std430) buffer model_t
{
layout(row_major) mediump mat3 mtx_rm;
} model;
void main()
{
mat3 mtx_cm = model.mtx_rm;
mat3 mtx1 = mtx_cm * mat3(vec3(4.0, -3.0, 1.0), vec3(-7.0, 7.0, -7.0), vec3(-5.0, 6.0, -8.0));
if (mtx1[0][0] != 0.0)
{
model.mtx_rm = mat3(vec3(-5.0, -3.0, -5.0), vec3(-2.0, 2.0, -5.0), vec3(6.0, 3.0, -8.0));
}
}