fix: rotate normals with model to correct helicopter lighting during rotation
This commit is contained in:
@@ -6,9 +6,10 @@ in layout(location=2) vec3 aNormal;
|
||||
out vec4 vColor;
|
||||
out vec3 vNormal;
|
||||
layout(location = 0) uniform mat4 transform;
|
||||
uniform mat3 normalMatrix;
|
||||
|
||||
void main() {
|
||||
gl_Position = transform * vec4(position, 1.0f);
|
||||
vColor = aColor;
|
||||
vNormal = aNormal;
|
||||
vNormal = normalize(normalMatrix * aNormal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user