Compare commits

..

3 Commits

Author SHA1 Message Date
Jay ff7349f77b opengl fix 2020-07-16 22:20:20 +01:00
Jay 603e4e49c2 Merge branch 'master' of https://github.com/teverse/teverse 2020-07-16 22:17:06 +01:00
Jay 8285c56bec updated fragment 2020-07-16 22:17:03 +01:00
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ void main()
vec3 V = normalize(uniformCameraPosition.xyz - wpos);
vec3 F0 = vec3(0.04, 0.04, 0.04);
F0 = mix(F0, colour, metallic);
F0 = mix(F0, colour.xyz, metallic);
vec3 L = lightDir;
vec3 H = normalize(V + L);
@ -110,5 +110,5 @@ void main()
// add to outgoing radiance Lo
float NdotL = max(dot(normal.xyz, L), 0.0);
gl_FragColor = vec4(((kD * colour / PI + specular) * lightColour * NdotL), colour.w);
gl_FragColor = vec4(((kD * colour.xyz / PI + specular) * lightColour * NdotL), colour.w);
}