Bug where widgets did not get their ambient light now fixed.
This commit is contained in:
@@ -126,7 +126,7 @@ void main()
|
|||||||
tilePos.y = int(gl_FragCoord.y/TILE_SIZE);
|
tilePos.y = int(gl_FragCoord.y/TILE_SIZE);
|
||||||
|
|
||||||
LightResult totalLighting;
|
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 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);
|
int start = int(LightGrids.Data[currentTile].Start);
|
||||||
|
|||||||
@@ -23,6 +23,16 @@ void EditorRenderSystem::Update(double dt)
|
|||||||
scene.Camera = m_EditorCamera;
|
scene.Camera = m_EditorCamera;
|
||||||
scene.Viewport = Rectangle(1920, 1080);
|
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");
|
auto models = m_World->GetComponents("Model");
|
||||||
if (models != nullptr) {
|
if (models != nullptr) {
|
||||||
for (auto& cModel : *models) {
|
for (auto& cModel : *models) {
|
||||||
|
|||||||
Reference in New Issue
Block a user