# Conflicts:
#	src/6.pbr/1.1.lighting/1.1.pbr.fs
#	src/6.pbr/1.2.lighting_textured/1.2.pbr.fs
#	src/6.pbr/2.1.1.ibl_irradiance_conversion/2.1.1.pbr.fs
#	src/6.pbr/2.1.2.ibl_irradiance/2.1.2.pbr.fs
#	src/6.pbr/2.2.1.ibl_specular/2.2.1.pbr.fs
#	src/6.pbr/2.2.2.ibl_specular_textured/2.2.2.pbr.fs
This commit is contained in:
Joey de Vries
2021-09-01 12:42:27 +02:00
3 changed files with 4 additions and 6 deletions

View File

@@ -97,7 +97,7 @@ int main()
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); // set texture wrapping to GL_REPEAT (default wrapping method)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
// set texture filtering parameters
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// load image, create texture and generate mipmaps
int width, height, nrChannels;

View File

@@ -250,11 +250,9 @@ int main()
shader.use();
glm::mat4 model = glm::mat4(1.0f);
camera.Yaw += 180.0f; // rotate the camera's yaw 180 degrees around
camera.Pitch += 180.0f; // rotate the camera's pitch 180 degrees around
camera.ProcessMouseMovement(0, 0, false); // call this to make sure it updates its camera vectors, note that we disable pitch constrains for this specific case (otherwise we can't reverse camera's pitch values)
glm::mat4 view = camera.GetViewMatrix();
camera.Yaw -= 180.0f; // reset it back to its original orientation
camera.Pitch -= 180.0f;
camera.ProcessMouseMovement(0, 0, true);
glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
shader.setMat4("view", view);

View File

@@ -273,7 +273,7 @@ int main(int argc, char* argv[])
// -----
// set render states
glDisable(GL_DEPTH);
glDisable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE); // enable depth writes so glClear won't ignore clearing the depth buffer
glDisable(GL_BLEND);