We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eebdfe1 commit 51e75d7Copy full SHA for 51e75d7
exercises/light-2/shaders/vertex.glsl
@@ -6,7 +6,7 @@ varying vec3 fragNormal;
6
7
void main() {
8
vec4 worldPosition = model * vec4(position, 1.0);
9
- vec4 worldNormal = vec4(normal, 0.0) * inverseModel;
+ vec4 worldNormal = vec4(normal, 0.0) * inverseModel * inverseView;
10
11
gl_Position = projection * view * worldPosition;
12
fragNormal = worldNormal.xyz;
0 commit comments