|
From: Lasse Kärkkäi. <tr...@us...> - 2011-03-13 00:50:22
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Mar 7 00:03:41 2011 +0100
Normals need to be normalized in both vertex and fragment shaders for proper weighting and interpolation.
---
data/shaders/core.vert | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/data/shaders/core.vert b/data/shaders/core.vert
index d3b5f4f..ee16a3d 100644
--- a/data/shaders/core.vert
+++ b/data/shaders/core.vert
@@ -20,7 +20,7 @@ varying vec4 vColor;
void main() {
gl_Position = positionMatrix * vertPos;
vTexCoord = texCoord = vertTexCoord;
- vNormal = normal = normalMatrix * vertNormal;
+ vNormal = normal = normalize(normalMatrix * vertNormal);
vColor = color = vertColor;
}
|