小编use*_*533的帖子

矩阵乘法与 glsl 中的向量

参考http://webglfundamentals.org/webgl/lessons/webgl-3d-orthographic.html 在矢量着色器中有mat4和 的乘法vec4

attribute vec4 a_position;

uniform mat4 u_matrix;

void main() {

  // Multiply the position by the matrix.

  gl_Position = u_matrix * a_position;

}
Run Code Online (Sandbox Code Playgroud)

如何将 4*4 矩阵与 1*4 矩阵相乘?不应该是gl_Position = a_position * u_matrix;

有人可以解释一下吗?

webgl

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

webgl ×1