Animation working

Code still wip and lacking comments
This commit is contained in:
Sascha Willems 2020-05-14 21:40:54 +02:00
parent 23010275ce
commit 78a9b5bde1
5 changed files with 67 additions and 10 deletions

View file

@ -8,8 +8,6 @@ layout (location = 2) in vec2 inUV;
layout (location = 3) in vec3 inViewVec;
layout (location = 4) in vec3 inLightVec;
layout (location = 5) in vec4 inColVis;
layout (location = 0) out vec4 outFragColor;
void main()
@ -20,9 +18,7 @@ void main()
vec3 L = normalize(inLightVec);
vec3 V = normalize(inViewVec);
vec3 R = reflect(-L, N);
vec3 diffuse = max(dot(N, L), 0.15) * inColor;
vec3 diffuse = max(dot(N, L), 0.5) * inColor;
vec3 specular = pow(max(dot(R, V), 0.0), 16.0) * vec3(0.75);
outFragColor = vec4(diffuse * color.rgb + specular, 1.0);
// outFragColor = inColVis;
}