Revert "Revert "Merge pull request #75 from teamfisk/NormalSpecularMapping""

This reverts commit b56824786c.
This commit is contained in:
2016-02-03 16:30:00 +01:00
parent b56824786c
commit bd2da7bc9f
29 changed files with 2029 additions and 145 deletions
+7 -1
View File
@@ -23,6 +23,12 @@ void EditorRenderSystem::Update(double dt)
scene.Camera = m_EditorCamera;
scene.Viewport = Rectangle(1920, 1080);
auto cSceneLight = m_World->GetComponents("SceneLight");
if (cSceneLight != nullptr) {
//these are hardcoded since they want special light treatment and a component just for widgets is stupid.
scene.AmbientColor = glm::vec4(0.8, 0.8, 0.8, 1.0);
}
auto models = m_World->GetComponents("Model");
if (models != nullptr) {
for (auto& cModel : *models) {
@@ -49,7 +55,7 @@ void EditorRenderSystem::Update(double dt)
glm::mat4 modelMatrix = Transform::ModelMatrix(entity.ID, entity.World);
for (auto matGroup : model->MaterialGroups()) {
std::shared_ptr<ModelJob> modelJob = std::make_shared<ModelJob>(model, scene.Camera, modelMatrix, matGroup, cModel, entity.World, glm::vec4(0), 0.f);
if(cModel["Transparent"]) {
if (cModel["Transparent"]) {
scene.TransparentObjects.push_back(modelJob);
} else {
scene.OpaqueObjects.push_back(modelJob);