NormalMap should cast shadows too

This commit is contained in:
Vincent Lejeune 2014-04-24 21:23:32 +02:00
parent 84ddd7119e
commit 7239154a3a

View File

@ -462,10 +462,12 @@ void STKMeshSceneNode::render()
glDisable(GL_CULL_FACE);
GLMesh* mesh;
if (!GeometricMesh[FPSM_DEFAULT].empty())
if (!GeometricMesh[FPSM_DEFAULT].empty() || !GeometricMesh[FPSM_NORMAL_MAP].empty())
glUseProgram(MeshShader::ShadowShader::Program);
for_in(mesh, GeometricMesh[FPSM_DEFAULT])
drawShadow(*mesh, AbsoluteTransformation);
for_in(mesh, GeometricMesh[FPSM_NORMAL_MAP])
drawShadow(*mesh, AbsoluteTransformation);
if (!GeometricMesh[FPSM_ALPHA_REF_TEXTURE].empty())
glUseProgram(MeshShader::RefShadowShader::Program);