albedo with refractions and reflactions of the cubemap

This commit is contained in:
2022-10-17 11:56:27 +02:00
parent 4f4eb2f496
commit 71c942d88e
3 changed files with 16 additions and 13 deletions

View File

@ -188,13 +188,18 @@ void Skybox_pass (GLuint& SkyboxVAO, Shader& skyboxShader, Cubemap& skycubemap)
void drawScene_pass(Shader& shader, Model& Object, Cubemap& skybox)
{
shader.use();
shader.setVec3("cameraPos", camera.Position);
glActiveTexture(GL_TEXTURE11);
skybox.Bind();
glActiveTexture(GL_TEXTURE0);
shader.setMat4("model", model);
shader.setMat4("view", view);
shader.setMat4("projection", projection);
shader.setInt("skybox",11);
Object.Draw(shader);
}