Skip to content
Snippets Groups Projects
Commit 483b9ef5 authored by Halvor Smedås's avatar Halvor Smedås
Browse files

removed cam debug error model

parent c14dc433
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ void main() {
//fragNormal = vec3(rotatedNormal);
vertex_color_out = rotatedNormal;
texCoord = uv;
fragNormal = mat3(transpose(inverse(m2w))) * normal;
fragNormal = mat3(transpose(inverse(m2w))) * normal; //http://www.lighthouse3d.com/tutorials/glsl-12-tutorial/the-normal-matrix/
vec4 out_position = MVP(position);
gl_Position = out_position;
......
......@@ -135,10 +135,10 @@ int main()
lightBuf.update(light1PosIndex, 16, &(lightData[1]));
lightBuf.update(light2PosIndex, 16, &(lightData[2]));
}
CameraTransform cameraTransform = ((EntityCamera*)Scene::getEntity(cameraID))->m_cameraTransform;
// UPDATE CAMERA MATRICES
{
CameraTransform cameraTransform = ((EntityCamera*)Scene::getEntity(cameraID))->m_cameraTransform;
//CameraTransform cameraTransform = ((EntityCamera*)Scene::getEntity(cameraID))-> m_cameraTransform;
matrixBuf.update(projectionIndex, sizeof(CameraTransform), &cameraTransform);
}
......@@ -146,8 +146,9 @@ int main()
// Draws all the models in the scene.
Scene::draw(t);
glm::mat4 camPosDebugM2W = glm::translate(glm::mat4(1), glm::vec3(cameraTransform.position));
Renderer::draw(ModelSystem::getById(0), camPosDebugM2W, t);
//This can be done to debug positions
//glm::mat4 camPosDebugM2W = glm::translate(glm::mat4(1), glm::vec3(cameraTransform.position));
//Renderer::draw(ModelSystem::getById(0), camPosDebugM2W, t);
glfwSwapBuffers(window);
glfwPollEvents();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment