Skip to content

Commit

Permalink
fix: webgpu-lighting-directional.md (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
devloop01 authored May 24, 2024
1 parent 77587fd commit d2c6e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webgpu/lessons/webgpu-lighting-directional.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ Now that we have these 2 functions we can compute and set the normal matrix.
+ mat4.multiply(viewProjectionMatrix, world, worldViewProjectionValue);
+
+ // Inverse and transpose it into the normalMatrix value
+ mat3.fromMat4(mat4.transpose(mat4.inverse(world), worldInverseTransposeValue));
+ mat3.fromMat4(mat4.transpose(mat4.inverse(world)), normalMatrixValue);
```
Because the effect is subtle and because we aren't scaling anything
Expand Down

0 comments on commit d2c6e87

Please sign in to comment.