Terrain refactor (#549)

- terrain separated into core logic and gui
- terrain can be serialized
- ddgi extents also saved, added control for smooth backface test
- raytraced shadow fixes
This commit is contained in:
Turánszki János
2022-09-01 18:42:16 +02:00
committed by GitHub
parent 1450b4b059
commit 60ef0ae251
41 changed files with 5818 additions and 5025 deletions
+16
View File
@@ -40,6 +40,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
cameraComponentWnd.Create(editor);
expressionWnd.Create(editor);
armatureWnd.Create(editor);
terrainWnd.Create(editor);
newComponentCombo.Create("Add: ");
@@ -310,6 +311,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
AddWidget(&cameraComponentWnd);
AddWidget(&expressionWnd);
AddWidget(&armatureWnd);
AddWidget(&terrainWnd);
materialWnd.SetVisible(false);
weatherWnd.SetVisible(false);
@@ -336,6 +338,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
cameraComponentWnd.SetVisible(false);
expressionWnd.SetVisible(false);
armatureWnd.SetVisible(false);
terrainWnd.SetVisible(false);
SetSize(editor->optionsWnd.GetSize());
}
@@ -703,4 +706,17 @@ void ComponentsWindow::ResizeLayout()
{
armatureWnd.SetVisible(false);
}
if (scene.terrains.Contains(terrainWnd.entity))
{
terrainWnd.SetVisible(true);
terrainWnd.SetPos(pos);
terrainWnd.SetSize(XMFLOAT2(width, terrainWnd.GetScale().y));
pos.y += terrainWnd.GetSize().y;
pos.y += padding;
}
else
{
terrainWnd.SetVisible(false);
}
}