summaryrefslogtreecommitdiffstats
path: root/engine/shaders/forward.vert
diff options
context:
space:
mode:
Diffstat (limited to 'engine/shaders/forward.vert')
-rw-r--r--engine/shaders/forward.vert3
1 files changed, 1 insertions, 2 deletions
diff --git a/engine/shaders/forward.vert b/engine/shaders/forward.vert
index bb38cc74..13bdb7e5 100644
--- a/engine/shaders/forward.vert
+++ b/engine/shaders/forward.vert
@@ -39,10 +39,9 @@ out gl_PerVertex {
void main() {
vec4 world = model * vec4(pos, 1.0);
- vec4 normal4 = model * vec4(normal, 1.0);
fragTexCoord = tex;
- fragNormal = normal4.xyz / normal4.w;
+ fragNormal = mat3(model) * normal;
fragWorldPos = world.xyz / world.w;
gl_Position = pco.view * world;