summaryrefslogtreecommitdiff
path: root/data/shaders/phong-vert.glsl
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-08-06 08:36:25 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-08-06 08:36:25 -0400
commite326a983893117508a6e94511c2f93913cd02256 (patch)
tree125944f4955d4518c0f3cba76f998dc2451fc99d /data/shaders/phong-vert.glsl
parent8c7a0c462544ad41e696890fa912ce3ad9dbe318 (diff)
graphics: phong: Improve lighting.
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);
}