diff --git a/cw 7/shaders/shader_5_tex.frag b/cw 7/shaders/shader_5_tex.frag index 4c3dec5..4f16664 100644 --- a/cw 7/shaders/shader_5_tex.frag +++ b/cw 7/shaders/shader_5_tex.frag @@ -62,8 +62,8 @@ void main() float diffuse=max(0.0001,dot(N,L)); - vec3 lambertian = max(0.00001, dot(N,L))*textureColor; + - vec3 Final = (kD*textureColor/3.1458993) + specular; - outColor = vec4(Final*min(1.0,AMBIENT + diffuse), 1.0); + + outColor = vec4(BRDF*min(1.0,AMBIENT + diffuse), 1.0); } diff --git a/cw 7/src/ex_7_1.hpp b/cw 7/src/ex_7_1.hpp index 15a457d..ff2d303 100644 --- a/cw 7/src/ex_7_1.hpp +++ b/cw 7/src/ex_7_1.hpp @@ -114,7 +114,7 @@ glm::mat4 createPerspectiveMatrix() glm::mat4 perspectiveMatrix; float n = 0.05; - float f = 20.; + float f = 60.; float a1 = glm::min(aspectRatio, 1.f); float a2 = glm::min(1 / aspectRatio, 1.f); perspectiveMatrix = glm::mat4({