mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-07 01:03:22 +08:00
Fix geometry shader normal homogenous coordinate, and use std::string instead of aString for model loading.
This commit is contained in:
@@ -13,6 +13,6 @@ uniform mat4 model;
|
||||
void main()
|
||||
{
|
||||
mat3 normalMatrix = mat3(transpose(inverse(view * model)));
|
||||
vs_out.normal = vec3(projection * vec4(normalMatrix * aNormal, 1.0));
|
||||
vs_out.normal = vec3(projection * vec4(normalMatrix * aNormal, 0.0));
|
||||
gl_Position = projection * view * model * vec4(aPos, 1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user