Skip to content

Commit

Permalink
Fixes mat4x4 projection in the orthographic tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
pwbh authored and greggman committed Nov 21, 2024
1 parent 57faac4 commit 5afc66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webgpu/lessons/webgpu-orthographic-projection.md
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ expanding it to 3D let's try
dst = dst || new Float32Array(16);
dst[ 0] = 2 / width; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;
dst[ 4] = 0; dst[ 5] = -2 / height; dst[ 6] = 0; dst[ 7] = 0;
dst[ 8] = 0; dst[ 9] = 0; dst[10] = 2 / depth; dst[11] = 0;
dst[12] = -1; dst[13] = 1; dst[14] = 1; dst[15] = 1;
dst[ 8] = 0; dst[ 9] = 0; dst[10] = 0.5 / depth; dst[11] = 0;
dst[12] = -1; dst[13] = 1; dst[14] = 0.5; dst[15] = 1;
return dst;
},
```
Expand Down

0 comments on commit 5afc66c

Please sign in to comment.