The shadows are working

This commit is contained in:
FakeShemp
2016-02-29 19:17:16 +01:00
parent 70374fa10e
commit 2ed5fad699
4 changed files with 15 additions and 24 deletions
+8 -10
View File
@@ -1014,6 +1014,14 @@ void DrawFinalPass::BindModelTextures(GLuint shaderHandle, std::shared_ptr<Model
glBindTexture(GL_TEXTURE_2D, m_BlackTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, "GlowUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
}
glActiveTexture(GL_TEXTURE6);
if (m_ShadowPass->DepthMap() != NULL) {
glBindTexture(GL_TEXTURE_2D_ARRAY, m_ShadowPass->DepthMap());
}
else {
glBindTexture(GL_TEXTURE_2D_ARRAY, m_WhiteTexture->m_Texture);
}
break;
}
case RawModel::MaterialType::SplatMapping:
@@ -1081,15 +1089,5 @@ void DrawFinalPass::BindModelTextures(GLuint shaderHandle, std::shared_ptr<Model
break;
}
}
glActiveTexture(GL_TEXTURE4);
if (m_ShadowPass->DepthMap() != NULL) {
glBindTexture(GL_TEXTURE_2D_ARRAY, m_ShadowPass->DepthMap());
}
else {
glBindTexture(GL_TEXTURE_2D_ARRAY, m_WhiteTexture->m_Texture);
}
}