MVPs are only needed for directional shadows and not for point light shadows.
This commit is contained in:
parent
7a95ddf6bb
commit
f306730920
@ -25,8 +25,8 @@ void Object::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass,
|
|||||||
// set model matrix
|
// set model matrix
|
||||||
shader->setUniform( "modelMatrix", modelMatrix);
|
shader->setUniform( "modelMatrix", modelMatrix);
|
||||||
// set shadowMVPs
|
// set shadowMVPs
|
||||||
glm::mat4 shadowMVPs[35];
|
glm::mat4 shadowMVPs[5];
|
||||||
for(unsigned int i = 0; (i<shadowVPs->size() && i<35); i++) {
|
for(unsigned int i = 0; (i<shadowVPs->size() && i<5); i++) {
|
||||||
shadowMVPs[i] = shadowVPs->at(i) * modelMatrix;
|
shadowMVPs[i] = shadowVPs->at(i) * modelMatrix;
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(shader->getUniformLocation("shadowMVPs"),
|
glUniformMatrix4fv(shader->getUniformLocation("shadowMVPs"),
|
||||||
|
Loading…
Reference in New Issue
Block a user