summaryrefslogtreecommitdiff
path: root/data/shaders/phong-vert.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'data/shaders/phong-vert.glsl')
-rw-r--r--data/shaders/phong-vert.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/shaders/phong-vert.glsl b/data/shaders/phong-vert.glsl
index 9b72eb3..f7fd363 100644
--- a/data/shaders/phong-vert.glsl
+++ b/data/shaders/phong-vert.glsl
@@ -30,7 +30,7 @@ uniform mat4 projection;
void main() {
fragWorldPos = vec3(model * vec4(position, 1.0));
- fragNorm = normalize(model * vec4(normal, 1.0)).xyz;
+ fragNorm = mat3(model) * normal;
fragTex = texcoord;
gl_Position = projection * view * vec4(fragWorldPos, 1.0);
}