Removed world from renderer and moved depth-calculation code to modeljob

This commit is contained in:
Tleety
2016-01-19 15:41:17 +01:00
parent 982837052a
commit 893ef38237
4 changed files with 14 additions and 25 deletions
+3
View File
@@ -28,6 +28,9 @@ struct ModelJob : RenderJob
Matrix = matrix;
Color = modelComponent["Color"];
Entity = modelComponent.EntityID;
glm::vec3 abspos = Transform::AbsolutePosition(world, modelComponent.EntityID);
glm::vec3 worldpos = glm::vec3(camera->ViewMatrix() * glm::vec4(abspos, 1));
Depth = worldpos.z;
World = world;
};