From 88bdb594aa592ef0b92906c8375da07325f63b09 Mon Sep 17 00:00:00 2001 From: Lukas Aldershaab Date: Mon, 4 Jan 2021 10:26:08 +0100 Subject: [PATCH] Set default terrain texture format --- Templates/BaseGame/game/core/rendering/Core_Rendering.cs | 9 +++++---- .../scripts/interfaces/terrainTextureSettingsDlg.ed.cs | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs b/Templates/BaseGame/game/core/rendering/Core_Rendering.cs index c9dd19d05..805331463 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.cs +++ b/Templates/BaseGame/game/core/rendering/Core_Rendering.cs @@ -19,10 +19,11 @@ function Core_Rendering::onCreate(%this) $Terrain::NormalTextureSize = ProjectSettings.value("Terrain/NormalTextureSize"); $Terrain::OrmTextureSize = ProjectSettings.value("Terrain/OrmTextureSize"); - $Terrain::DetailTextureFormat = ProjectSettings.value("Terrain/DetailTextureFormat"); - $Terrain::MacroTextureFormat = ProjectSettings.value("Terrain/MacroTextureFormat"); - $Terrain::NormalTextureFormat = ProjectSettings.value("Terrain/NormalTextureFormat"); - $Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat"); + // Default to R8G8B8A8 for all textures + $Terrain::DetailTextureFormat = ProjectSettings.value("Terrain/DetailTextureFormat", 12); + $Terrain::MacroTextureFormat = ProjectSettings.value("Terrain/MacroTextureFormat", 12); + $Terrain::NormalTextureFormat = ProjectSettings.value("Terrain/NormalTextureFormat", 12); + $Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat", 12); exec("./scripts/graphicsOptions.cs"); exec("./scripts/terrainSettings.cs"); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainTextureSettingsDlg.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainTextureSettingsDlg.ed.cs index 7f21583fb..bf025cec7 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainTextureSettingsDlg.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainTextureSettingsDlg.ed.cs @@ -57,10 +57,10 @@ function TerrainTextureSettingsDlg::onWake( %this ) { %this-->normalTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/NormalTextureFormat"), false); %this-->ormTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/OrmTextureFormat"), false); - %this-->detailTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/DetailTextureSize")); - %this-->macroTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/MacroTextureSize")); - %this-->normalTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/NormalTextureSize")); - %this-->ormTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/OrmTextureSize")); + %this-->detailTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/DetailTextureSize", 12)); + %this-->macroTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/MacroTextureSize", 12)); + %this-->normalTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/NormalTextureSize", 12)); + %this-->ormTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/OrmTextureSize", 12)); } function TerrainTextureSettingsDlg::updateBlendDepth( %this ) {