Added normal matrices to transformable
This commit is contained in:
parent
b3e82ca9df
commit
862ef6d34b
3 changed files with 15 additions and 1 deletions
|
@ -274,7 +274,7 @@ int main(int argc, char** argv)
|
|||
for (oglu::Object& cube : cubes)
|
||||
{
|
||||
shader->SetUniform("model", cube);
|
||||
shader->SetUniformMatrix3fv("normal", 1, GL_FALSE, glm::value_ptr(glm::mat3(glm::transpose(glm::inverse(cube.GetMatrix())))));
|
||||
shader->SetUniformMatrix3fv("normal", 1, GL_FALSE, glm::value_ptr(cube.GetNormalMatrix()));
|
||||
cube.Render();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue