Skip to content

Commit

Permalink
feat(core): improve matrix to opengl conversion (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarthificial committed Mar 11, 2024
1 parent 27f24e1 commit 2fadc88
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/core/src/types/Matrix2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,17 @@ export class Matrix2D implements Type, WebGLConvertible {
gl: WebGL2RenderingContext,
location: WebGLUniformLocation,
): void {
gl.uniformMatrix3x2fv(location, false, this.values);
gl.uniformMatrix3fv(location, false, [
this.values[0],
this.values[1],
0,
this.values[2],
this.values[3],
0,
this.values[4],
this.values[5],
1,
]);
}

public equals(other: Matrix2D, threshold: number = EPSILON): boolean {
Expand Down

0 comments on commit 2fadc88

Please sign in to comment.