diff --git a/cw 7/shaders/shader_5_tex.frag b/cw 7/shaders/shader_5_tex.frag index 32865a8..eedb5a2 100644 --- a/cw 7/shaders/shader_5_tex.frag +++ b/cw 7/shaders/shader_5_tex.frag @@ -1,7 +1,7 @@ #version 430 core -float AMBIENT = 0.2; -float roughness = 0.1; +float AMBIENT = 0.6; +float roughness = 0.2; float metalic = 0.8; @@ -9,6 +9,9 @@ uniform vec3 color; uniform sampler2D colorTexture; uniform sampler2D normalSampler; +uniform sampler2D metalnessTexture; +uniform sampler2D roughnessTexture; + in vec3 worldPos; in vec2 vecTex; @@ -24,6 +27,8 @@ void main() vec3 V = (viewDirTS); vec3 textureColor = texture2D(colorTexture, vecTex).xyz; + float metalnessValue = texture2D(metalnessTexture, vecTex).r; + float roughnessValue = texture2D(roughnessTexture, vecTex).r; vec3 N = texture2D(normalSampler, vecTex).xyz; N = 2.0 * N - 1.0; diff --git a/cw 7/src/ex_7_1.hpp b/cw 7/src/ex_7_1.hpp index 906e727..e980368 100644 --- a/cw 7/src/ex_7_1.hpp +++ b/cw 7/src/ex_7_1.hpp @@ -424,8 +424,8 @@ void processInput(GLFWwindow* window) { spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f))); spaceshipUp = glm::vec3(0.f, 1.f, 0.f); - float angleSpeed = 0.005f; - float moveSpeed = 0.005f; + float angleSpeed = 0.05f; + float moveSpeed = 0.05f; double x = 0.002;