diff --git a/cw 7/shaders/shader_5_1_tex.frag b/cw 7/shaders/shader_5_1_tex.frag index 725da25..a138fb0 100644 --- a/cw 7/shaders/shader_5_1_tex.frag +++ b/cw 7/shaders/shader_5_1_tex.frag @@ -80,7 +80,7 @@ void main() //get normal from normal sampler vec3 samplerNormal = texture2D(normalSampler, vertexTexCoordOut).xyz; samplerNormal = 2 * samplerNormal - 1;//since sampler has values from [0, 1], but we want [-1, 1] - normalizedVertexNormal = normalized(samplerNormal);// to avoid potential precision problems in sampler texture + normalizedVertexNormal = normalize(samplerNormal);// to avoid potential precision problems in sampler texture //tmp solution //normalizedVertexNormal = vec3(0, 0, 1); diff --git a/cw 7/src/ex_7_1.hpp b/cw 7/src/ex_7_1.hpp index 49d3c3c..0b73c62 100644 --- a/cw 7/src/ex_7_1.hpp +++ b/cw 7/src/ex_7_1.hpp @@ -311,13 +311,21 @@ void init_cubemap() { int w, h; unsigned char* data; + //std::vector cubeSideTestureFiles = { + // "./textures/skybox/space_rt.png", + // "./textures/skybox/space_lt.png", + // "./textures/skybox/space_up.png", + // "./textures/skybox/space_dn.png", + // "./textures/skybox/space_bk.png", + // "./textures/skybox/space_ft.png", + //}; std::vector cubeSideTestureFiles = { - "./textures/skybox/space_rt.png", - "./textures/skybox/space_lt.png", - "./textures/skybox/space_up.png", - "./textures/skybox/space_dn.png", - "./textures/skybox/space_bk.png", - "./textures/skybox/space_ft.png", + "./textures/space_skybox1/right.png", + "./textures/space_skybox1/left.png", + "./textures/space_skybox1/top.png", + "./textures/space_skybox1/bottom.png", + "./textures/space_skybox1/front.png", + "./textures/space_skybox1/back.png", }; for (unsigned int i = 0; i < 6; i++) { @@ -354,7 +362,7 @@ void init(GLFWwindow* window) texture::earth = Core::LoadTexture("./textures/earth.png"); texture::clouds = Core::LoadTexture("./textures/clouds.jpg"); //moon.png doesn't load correctly - texture::moon = Core::LoadTexture("./textures/moon.png"); + texture::moon = Core::LoadTexture("./textures/moon.jpg"); texture::ship = Core::LoadTexture("./textures/spaceship.jpg"); texture::scratches = Core::LoadTexture("./textures/scratches.jpg"); texture::rust = Core::LoadTexture("./textures/rust.jpg");