Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for oF v. 0.10 #5

Open
alptugan opened this issue Aug 10, 2019 · 0 comments
Open

Fix for oF v. 0.10 #5

alptugan opened this issue Aug 10, 2019 · 0 comments

Comments

@alptugan
Copy link

In ofxShaderFX_LightingShader.cpp edit line 354-355 as follows;
m_normalMatrix = ofMatrix4x4::getTransposedOf(m_cam->getModelViewMatrix()); m_shader.setUniformMatrix4f("normalMatrix", m_normalMatrix.getInverse());

Also, line 439 should be updated as follows;
glm::vec4 eyeSpaceLightPos = glm::vec4(m_lights[lightIndex]->getGlobalPosition().x,m_lights[lightIndex]->getGlobalPosition().y,m_lights[lightIndex]->getGlobalPosition().z,1.0) * m_cam->getModelViewMatrix();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant