Bug where widgets did not get their ambient light now fixed.

This commit is contained in:
Tleety
2016-02-01 18:19:38 +01:00
parent 53cae25eb2
commit ed7d00c1d8
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ void main()
tilePos.y = int(gl_FragCoord.y/TILE_SIZE);
LightResult totalLighting;
totalLighting.Diffuse = AmbientColor;
totalLighting.Diffuse = vec4(AmbientColor.rgb, 1.0);
int currentTile = int(floor(gl_FragCoord.x/TILE_SIZE) + (floor(gl_FragCoord.y/TILE_SIZE) * int(ScreenDimensions.x/TILE_SIZE)));
int start = int(LightGrids.Data[currentTile].Start);
+10
View File
@@ -23,6 +23,16 @@ void EditorRenderSystem::Update(double dt)
scene.Camera = m_EditorCamera;
scene.Viewport = Rectangle(1920, 1080);
auto cSceneLight = m_World->GetComponents("SceneLight");
if (cSceneLight != nullptr) {
//m_RenderFrame->Gamma = (double)(*cSceneLight->begin())["Gamma"];
//m_RenderFrame->Exposure = (double)(*cSceneLight->begin())["Exposure"];
//scene.AmbientColor = (glm::vec4)(*cSceneLight->begin())["AmbientColor"];
m_RenderFrame->Gamma = 2.2;
m_RenderFrame->Exposure = 1.0;
scene.AmbientColor = glm::vec4(0.6, 0.5, 0.5, 1.0);
}
auto models = m_World->GetComponents("Model");
if (models != nullptr) {
for (auto& cModel : *models) {