mirror of
https://github.com/IllusionMan1212/3dobs.git
synced 2026-10-24 10:12:35 +00:00
calc normal mat on cpu. use blinn-phong lighting. adjust lighting intensities
This commit is contained in:
+2
-1
@@ -9,11 +9,12 @@ out vec2 texCoords;
|
||||
uniform mat4 model;
|
||||
uniform mat4 view;
|
||||
uniform mat4 projection;
|
||||
uniform mat3 normalMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = projection * view * model * vec4(aPos, 1.0f);
|
||||
fragNormals = mat3(transpose(inverse(model))) * aNormal;
|
||||
fragNormals = normalMatrix * aNormal;
|
||||
fragPos = vec3(model * vec4(aPos, 1.0));
|
||||
texCoords = aTexCoords;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user