Packaging updates (#846)

This commit is contained in:
Turánszki János
2024-05-22 17:15:13 +02:00
committed by GitHub
parent 85fabb7fc9
commit de656d7bbc
45 changed files with 240 additions and 513 deletions
+12 -76
View File
@@ -9,11 +9,7 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NuGetAPIKey }}
- run: nuget restore WickedEngine.sln
- uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
@@ -21,7 +17,8 @@ jobs:
cd "WickedEngine"
"../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection
cd ..
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:rebuild /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64
- name: Move files
shell: cmd
@@ -29,18 +26,14 @@ jobs:
move BUILD\x64\Release\Editor_Windows\Editor_Windows.exe .\
move Editor\config.ini .\
move Editor\startup.lua .\
move Editor\terrain .\
move Editor\languages .\
move Editor\fonts .\
move Content\Documentation .\
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Windows)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
@@ -51,7 +44,7 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: |
@@ -74,90 +67,33 @@ jobs:
- name: Move files
run: |
mv build/Editor/WickedEngineEditor ./
mv build/Editor/WickedEngineEditor ./Editor_Linux
mv Editor/config.ini ./
mv Editor/startup.lua ./
mv Editor/terrain ./
mv Editor/languages ./
mv Editor/fonts ./
mv Content/Documentation ./
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Linux)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
startup.lua
WickedEngineEditor
Editor_Linux
content:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Package Content
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Content
path: |
Content/Documentation
Content/models
Content/scripts
#linux-steamdeck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# sudo apt update
# sudo apt install libsdl2-dev
# - name: Build
# run: |
# mkdir build
# echo "---Building Command Strings---"
# echo -e "#!/bin/bash \
# \nmkdir -p $(dirname $PWD) \
# \nln -s /build $PWD \
# \ncd /build/build \
# \ncmake .. -DCMAKE_BUILD_TYPE=Release \
# \nmake \
# \necho \"---Generating Shader Dump---\" \
# \ncd WickedEngine \
# \n./offlineshadercompiler spirv rebuild shaderdump\nmv wiShaderDump.h ../../WickedEngine/ \
# \necho \"---Rebuilding with ShaderDump---\" \
# \ncd .. \
# \nmake -B" > build.sh
# chmod +x build.sh
# echo "---Executing Containerized Build---"
# podman run --name sniper -v $PWD:/build registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest /build/build.sh
# podman container rm sniper
# - name: Move files
# run: |
# mv build/Editor/WickedEngineEditor ./
# mv Editor/config.ini ./
# mv Editor/startup.lua ./
# mv Editor/terrain ./
# mv Editor/languages ./
# mv Editor/fonts ./
# mv Content/Documentation ./
# - name: Package Editor
# uses: actions/upload-artifact@v2
# with:
# name: Editor (Linux - Steam Deck)
# path: |
# Documentation/
# terrain/
# languages/
# fonts/
# config.ini
# startup.lua
# WickedEngineEditor
Content/terrain
+12 -76
View File
@@ -8,11 +8,7 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NuGetAPIKey }}
- run: nuget restore WickedEngine.sln
- uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
@@ -20,7 +16,8 @@ jobs:
cd "WickedEngine"
"../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection
cd ..
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:rebuild /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64
- name: Move files
shell: cmd
@@ -28,18 +25,14 @@ jobs:
move BUILD\x64\Release\Editor_Windows\Editor_Windows.exe .\
move Editor\config.ini .\
move Editor\startup.lua .\
move Editor\terrain .\
move Editor\languages .\
move Editor\fonts .\
move Content\Documentation .\
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Windows)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
@@ -50,7 +43,7 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: |
@@ -74,90 +67,33 @@ jobs:
- name: Move binaries
run: |
mv build/Editor/WickedEngineEditor ./
mv build/Editor/WickedEngineEditor ./Editor_Linux
mv Editor/config.ini ./
mv Editor/startup.lua ./
mv Editor/terrain ./
mv Editor/languages ./
mv Editor/fonts ./
mv Content/Documentation ./
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Linux)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
startup.lua
WickedEngineEditor
Editor_Linux
content:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Package Content
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Content
path: |
Content/Documentation
Content/models
Content/scripts
#linux-steamdeck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# sudo apt update
# sudo apt install libsdl2-dev
# - name: Build
# run: |
# mkdir build
# echo "---Building Command Strings---"
# echo -e "#!/bin/bash \
# \nmkdir -p $(dirname $PWD) \
# \nln -s /build $PWD \
# \ncd /build/build \
# \ncmake .. -DCMAKE_BUILD_TYPE=Release \
# \nmake \
# \necho \"---Generating Shader Dump---\" \
# \ncd WickedEngine \
# \n./offlineshadercompiler spirv rebuild shaderdump\nmv wiShaderDump.h ../../WickedEngine/ \
# \necho \"---Rebuilding with ShaderDump---\" \
# \ncd .. \
# \nmake -B" > build.sh
# chmod +x build.sh
# echo "---Executing Containerized Build---"
# podman run --name sniper -v $PWD:/build registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest /build/build.sh
# podman container rm sniper
# - name: Move files
# run: |
# mv build/Editor/WickedEngineEditor ./
# mv Editor/config.ini ./
# mv Editor/startup.lua ./
# mv Editor/terrain ./
# mv Editor/languages ./
# mv Editor/fonts ./
# mv Content/Documentation ./
# - name: Package Editor
# uses: actions/upload-artifact@v2
# with:
# name: Editor (Linux - Steam Deck)
# path: |
# Documentation/
# terrain/
# languages/
# fonts/
# config.ini
# startup.lua
# WickedEngineEditor
Content/terrain
+12 -76
View File
@@ -9,11 +9,7 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NuGetAPIKey }}
- run: nuget restore WickedEngine.sln
- uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
@@ -21,7 +17,8 @@ jobs:
cd "WickedEngine"
"../BUILD/x64/Release/OfflineShaderCompiler/OfflineShaderCompiler.exe" hlsl6 spirv shaderdump strip_reflection
cd ..
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:rebuild /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:clean /m /p:Configuration=Release /p:Platform=x64
"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" WickedEngine.sln /t:Editor_Windows /m /p:Configuration=Release /p:Platform=x64
- name: Move files
shell: cmd
@@ -29,18 +26,14 @@ jobs:
move BUILD\x64\Release\Editor_Windows\Editor_Windows.exe .\
move Editor\config.ini .\
move Editor\startup.lua .\
move Editor\terrain .\
move Editor\languages .\
move Editor\fonts .\
move Content\Documentation .\
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Windows)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
@@ -51,7 +44,7 @@ jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: |
@@ -75,90 +68,33 @@ jobs:
- name: Move files
run: |
mv build/Editor/WickedEngineEditor ./
mv build/Editor/WickedEngineEditor ./Editor_Linux
mv Editor/config.ini ./
mv Editor/startup.lua ./
mv Editor/terrain ./
mv Editor/languages ./
mv Editor/fonts ./
mv Content/Documentation ./
- name: Package Editor
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Editor (Linux)
path: |
Documentation/
terrain/
languages/
fonts/
config.ini
startup.lua
WickedEngineEditor
Editor_Linux
content:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Package Content
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Content
path: |
Content/Documentation
Content/models
Content/scripts
#linux-steamdeck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# sudo apt update
# sudo apt install libsdl2-dev
# - name: Build
# run: |
# mkdir build
# echo "---Building Command Strings---"
# echo -e "#!/bin/bash \
# \nmkdir -p $(dirname $PWD) \
# \nln -s /build $PWD \
# \ncd /build/build \
# \ncmake .. -DCMAKE_BUILD_TYPE=Release \
# \nmake \
# \necho \"---Generating Shader Dump---\" \
# \ncd WickedEngine \
# \n./offlineshadercompiler spirv rebuild shaderdump\nmv wiShaderDump.h ../../WickedEngine/ \
# \necho \"---Rebuilding with ShaderDump---\" \
# \ncd .. \
# \nmake -B" > build.sh
# chmod +x build.sh
# echo "---Executing Containerized Build---"
# podman run --name sniper -v $PWD:/build registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest /build/build.sh
# podman container rm sniper
# - name: Move files
# run: |
# mv build/Editor/WickedEngineEditor ./
# mv Editor/config.ini ./
# mv Editor/startup.lua ./
# mv Editor/terrain ./
# mv Editor/languages ./
# mv Editor/fonts ./
# mv Content/Documentation ./
# - name: Package Editor
# uses: actions/upload-artifact@v2
# with:
# name: Editor (Linux - Steam Deck)
# path: |
# Documentation/
# terrain/
# languages/
# fonts/
# config.ini
# startup.lua
# WickedEngineEditor
Content/terrain
+43
View File
@@ -502,6 +502,18 @@
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\grass.ini">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.ini">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.wiscene">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
</ItemGroup>
<ItemGroup>
<Image Include="$(MSBuildThisFileDirectory)models\billboardredflowers.png" />
@@ -613,6 +625,36 @@
<Image Include="$(MSBuildThisFileDirectory)scripts\fighting_game\assets\ripple.png" />
<Image Include="$(MSBuildThisFileDirectory)scripts\fighting_game\assets\smoke0.png" />
<Image Include="$(MSBuildThisFileDirectory)scripts\fighting_game\thumbnail.png" />
<Image Include="$(MSBuildThisFileDirectory)terrain\base.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\base_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\foil.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\foil_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\grassparticle.dds" />
<Image Include="$(MSBuildThisFileDirectory)terrain\ground.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\ground_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\lava.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_emi.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\rock.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\rock_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\slope.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\slope_nor.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving.jpg" />
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving_nor.jpg" />
</ItemGroup>
<ItemGroup>
<Media Include="$(MSBuildThisFileDirectory)models\water.wav" />
@@ -620,5 +662,6 @@
</ItemGroup>
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)models\Sponza\copyright.txt" />
<Text Include="$(MSBuildThisFileDirectory)terrain\licenses.txt" />
</ItemGroup>
</Project>
+105
View File
@@ -37,6 +37,9 @@
<Filter Include="scripts\dungeon_generator\assets">
<UniqueIdentifier>{a8242a40-dd2a-46f8-95a9-1b7431c79043}</UniqueIdentifier>
</Filter>
<Filter Include="terrain">
<UniqueIdentifier>{f61a70fd-1b03-4bb7-a044-2442d8557486}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)scripts\camera_animation_clamped.lua">
@@ -252,6 +255,15 @@
<None Include="$(MSBuildThisFileDirectory)scripts\character_controller\assets\animations.wiscene">
<Filter>scripts\character_controller\assets</Filter>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\grass.ini">
<Filter>terrain</Filter>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.ini">
<Filter>terrain</Filter>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.wiscene">
<Filter>terrain</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Image Include="$(MSBuildThisFileDirectory)models\Sponza\textures\background.png">
@@ -581,6 +593,96 @@
<Image Include="$(MSBuildThisFileDirectory)scripts\fighting_game\thumbnail.png">
<Filter>scripts\fighting_game</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\base.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\base_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\grassparticle.dds">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_emi.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving_nor.jpg">
<Filter>terrain</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Media Include="$(MSBuildThisFileDirectory)models\water.wav">
@@ -594,5 +696,8 @@
<Text Include="$(MSBuildThisFileDirectory)models\Sponza\copyright.txt">
<Filter>models\Sponza</Filter>
</Text>
<Text Include="$(MSBuildThisFileDirectory)terrain\licenses.txt">
<Filter>terrain</Filter>
</Text>
</ItemGroup>
</Project>

Before

Width:  |  Height:  |  Size: 800 KiB

After

Width:  |  Height:  |  Size: 800 KiB

Before

Width:  |  Height:  |  Size: 852 KiB

After

Width:  |  Height:  |  Size: 852 KiB

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 509 KiB

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

Before

Width:  |  Height:  |  Size: 448 KiB

After

Width:  |  Height:  |  Size: 448 KiB

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before

Width:  |  Height:  |  Size: 530 KiB

After

Width:  |  Height:  |  Size: 530 KiB

Before

Width:  |  Height:  |  Size: 1024 KiB

After

Width:  |  Height:  |  Size: 1024 KiB

Before

Width:  |  Height:  |  Size: 897 KiB

After

Width:  |  Height:  |  Size: 897 KiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Before

Width:  |  Height:  |  Size: 684 KiB

After

Width:  |  Height:  |  Size: 684 KiB

Before

Width:  |  Height:  |  Size: 842 KiB

After

Width:  |  Height:  |  Size: 842 KiB

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

-3
View File
@@ -83,7 +83,6 @@ add_custom_command(
TARGET WickedEngineEditor POST_BUILD
# Copy shader compiler library in the source folder
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${WICKED_ROOT_DIR}/WickedEngine/${LIB_DXCOMPILER} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/terrain ${CMAKE_CURRENT_BINARY_DIR}/terrain
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/languages ${CMAKE_CURRENT_BINARY_DIR}/languages
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/fonts ${CMAKE_CURRENT_BINARY_DIR}/fonts
)
@@ -102,9 +101,7 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/wicked-engine.sh"
install(TARGETS WickedEngineEditor RUNTIME DESTINATION ${EDITOR_INSTALL_FOLDER})
# install editor assets
# mandatory terrain folder
install(DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/terrain"
"${CMAKE_CURRENT_SOURCE_DIR}/languages"
"${CMAKE_CURRENT_SOURCE_DIR}/fonts"
DESTINATION ${EDITOR_INSTALL_FOLDER})
-138
View File
@@ -210,140 +210,6 @@
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\grass.ini">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.ini">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.wiscene">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</None>
</ItemGroup>
<ItemGroup>
<Image Include="$(MSBuildThisFileDirectory)terrain\base.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\base_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\grassparticle.dds">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_emi.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving_nor.jpg">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Image>
</ItemGroup>
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)fonts\readme.txt">
@@ -354,10 +220,6 @@
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Text>
<Text Include="$(MSBuildThisFileDirectory)terrain\licenses.txt">
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
</Text>
</ItemGroup>
<ItemGroup>
<Xml Include="$(MSBuildThisFileDirectory)languages\Magyar.xml">
-107
View File
@@ -154,23 +154,11 @@
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)startup.lua" />
<None Include="$(MSBuildThisFileDirectory)config.ini" />
<None Include="$(MSBuildThisFileDirectory)terrain\props.wiscene">
<Filter>terrain</Filter>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\props.ini">
<Filter>terrain</Filter>
</None>
<None Include="$(MSBuildThisFileDirectory)terrain\grass.ini">
<Filter>terrain</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Filter Include="meshoptimizer">
<UniqueIdentifier>{49c521c0-5dca-4fce-b8c5-a334d1746d98}</UniqueIdentifier>
</Filter>
<Filter Include="terrain">
<UniqueIdentifier>{9a5b997d-f07e-45c5-849a-717f15cba0ab}</UniqueIdentifier>
</Filter>
<Filter Include="languages">
<UniqueIdentifier>{beae58b9-9c06-4b1f-9e03-a27712d6a579}</UniqueIdentifier>
</Filter>
@@ -179,101 +167,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<Image Include="$(MSBuildThisFileDirectory)terrain\base.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\base_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\slope_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\high_altitude_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\low_altitude_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\grassparticle.dds">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\bricks_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\darkrock_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\foil_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\ground2_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_emi.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\lava_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\metalplate_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\pavingstone_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\rock_nor.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving.jpg">
<Filter>terrain</Filter>
</Image>
<Image Include="$(MSBuildThisFileDirectory)terrain\tactilepaving_nor.jpg">
<Filter>terrain</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Text Include="$(MSBuildThisFileDirectory)terrain\licenses.txt">
<Filter>terrain</Filter>
</Text>
<Text Include="$(MSBuildThisFileDirectory)languages\readme.txt">
<Filter>languages</Filter>
</Text>
+46 -34
View File
@@ -1455,14 +1455,27 @@ void TerrainWindow::SetupAssets()
material_Slope->SetRoughness(0.1f);
material_LowAltitude->SetRoughness(1);
material_HighAltitude->SetRoughness(1);
material_Base->textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/base.jpg";
material_Base->textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/base_nor.jpg";
material_Slope->textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/slope.jpg";
material_Slope->textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/slope_nor.jpg";
material_LowAltitude->textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/low_altitude.jpg";
material_LowAltitude->textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/low_altitude_nor.jpg";
material_HighAltitude->textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/high_altitude.jpg";
material_HighAltitude->textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/high_altitude_nor.jpg";
std::string asset_path = wi::helper::GetCurrentPath() + "/Content/terrain/";
if (!wi::helper::DirectoryExists(asset_path))
{
// Usually in source download, the assets are one level outside of Editor:
asset_path = wi::helper::GetCurrentPath() + "/../Content/terrain/";
}
if (!wi::helper::DirectoryExists(asset_path))
{
// In UWP or older Editor content, it's not in Content folder:
asset_path = wi::helper::GetCurrentPath() + "/terrain/";
}
material_Base->textures[MaterialComponent::BASECOLORMAP].name = asset_path + "base.jpg";
material_Base->textures[MaterialComponent::NORMALMAP].name = asset_path + "base_nor.jpg";
material_Slope->textures[MaterialComponent::BASECOLORMAP].name = asset_path + "slope.jpg";
material_Slope->textures[MaterialComponent::NORMALMAP].name = asset_path + "slope_nor.jpg";
material_LowAltitude->textures[MaterialComponent::BASECOLORMAP].name = asset_path + "low_altitude.jpg";
material_LowAltitude->textures[MaterialComponent::NORMALMAP].name = asset_path + "low_altitude_nor.jpg";
material_HighAltitude->textures[MaterialComponent::BASECOLORMAP].name = asset_path + "high_altitude.jpg";
material_HighAltitude->textures[MaterialComponent::NORMALMAP].name = asset_path + "high_altitude_nor.jpg";
// Extra material: rock
{
@@ -1470,8 +1483,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Rock";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/rock.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/rock_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "rock.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "rock_nor.jpg";
mat.roughness = 0.9f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1481,8 +1494,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Ground";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/ground.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/ground_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "ground.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "ground_nor.jpg";
mat.roughness = 0.9f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1492,8 +1505,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Ground2";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/ground2.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/ground2_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "ground2.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "ground2_nor.jpg";
mat.roughness = 0.9f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1503,8 +1516,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Bricks";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/bricks.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/bricks_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "bricks.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "bricks_nor.jpg";
mat.roughness = 0.9f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1514,8 +1527,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Dark Rock";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/darkrock.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/darkrock_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "darkrock.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "darkrock_nor.jpg";
mat.roughness = 0.8f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1525,8 +1538,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Metal Plate";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/metalplate.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/metalplate_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "metalplate.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "metalplate_nor.jpg";
mat.metalness = 1;
mat.roughness = 0.5f;
terrain_preset.materialEntities.push_back(materialEntity);
@@ -1537,8 +1550,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Foil";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/foil.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/foil_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "foil.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "foil_nor.jpg";
mat.metalness = 1;
mat.roughness = 0.01f;
terrain_preset.materialEntities.push_back(materialEntity);
@@ -1549,8 +1562,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Paving Stone";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/pavingstone.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/pavingstone_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "pavingstone.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "pavingstone_nor.jpg";
terrain_preset.materialEntities.push_back(materialEntity);
}
// Extra material: tactilepaving
@@ -1559,8 +1572,8 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Tactile Paving";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/tactilepaving.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/tactilepaving_nor.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "tactilepaving.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "tactilepaving_nor.jpg";
terrain_preset.materialEntities.push_back(materialEntity);
}
// Extra material: lava
@@ -1569,9 +1582,9 @@ void TerrainWindow::SetupAssets()
MaterialComponent& mat = currentScene.materials.Create(materialEntity);
currentScene.names.Create(materialEntity) = "Lava";
currentScene.Component_Attach(materialEntity, entity);
mat.textures[MaterialComponent::BASECOLORMAP].name = wi::helper::GetCurrentPath() + "/terrain/lava.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = wi::helper::GetCurrentPath() + "/terrain/lava_nor.jpg";
mat.textures[MaterialComponent::EMISSIVEMAP].name = wi::helper::GetCurrentPath() + "/terrain/lava_emi.jpg";
mat.textures[MaterialComponent::BASECOLORMAP].name = asset_path + "lava.jpg";
mat.textures[MaterialComponent::NORMALMAP].name = asset_path + "lava_nor.jpg";
mat.textures[MaterialComponent::EMISSIVEMAP].name = asset_path + "lava_emi.jpg";
mat.roughness = 0.8f;
terrain_preset.materialEntities.push_back(materialEntity);
}
@@ -1585,9 +1598,8 @@ void TerrainWindow::SetupAssets()
material->CreateRenderData();
});
std::string terrain_path = wi::helper::GetCurrentPath() + "/terrain/";
wi::config::File config;
config.Open(std::string(terrain_path + "props.ini").c_str());
config.Open(std::string(asset_path + "props.ini").c_str());
std::unordered_map<std::string, Scene> prop_scenes;
for (const auto& it : config)
@@ -1602,7 +1614,7 @@ void TerrainWindow::SetupAssets()
std::string text = section.GetText("file");
if (prop_scenes.count(text) == 0)
{
wi::scene::LoadModel(prop_scenes[text], terrain_path + text);
wi::scene::LoadModel(prop_scenes[text], asset_path + text);
}
if (prop_scenes.count(text) != 0)
{
@@ -1693,10 +1705,10 @@ void TerrainWindow::SetupAssets()
MaterialComponent* material_Grass = currentScene.materials.GetComponent(terrain_preset.grassEntity);
wi::HairParticleSystem* grass = currentScene.hairs.GetComponent(terrain_preset.grassEntity);
wi::config::File grass_config;
grass_config.Open(std::string(terrain_path + "grass.ini").c_str());
grass_config.Open(std::string(asset_path + "grass.ini").c_str());
if (grass_config.Has("texture"))
{
material_Grass->textures[MaterialComponent::BASECOLORMAP].name = terrain_path + grass_config.GetText("texture");
material_Grass->textures[MaterialComponent::BASECOLORMAP].name = asset_path + grass_config.GetText("texture");
material_Grass->CreateRenderData();
}
if (grass_config.Has("alphaRef"))
+8
View File
@@ -110,6 +110,7 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo
{
transform.ClearTransform();
transform.UpdateTransform();
state = TRANSLATOR_IDLE;
return;
}
@@ -141,7 +142,10 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo
{
PreTranslate();
if (!has_selected_transform)
{
state = TRANSLATOR_IDLE;
return;
}
const Ray ray = wi::renderer::GetPickRay((long)currentMouse.x, (long)currentMouse.y, canvas, camera);
const XMVECTOR rayOrigin = XMLoadFloat3(&ray.origin);
@@ -385,7 +389,10 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo
plane = XMPlaneFromPointNormal(pos, XMVector3Normalize(planeNormal));
if (XMVectorGetX(XMVectorAbs(XMVector3Dot(planeNormal, rayDir))) < 0.001f)
{
state = TRANSLATOR_IDLE;
return;
}
XMVECTOR intersection = XMPlaneIntersectLine(plane, rayOrigin, rayOrigin + rayDir * camera.zFarP);
if (!dragging)
@@ -488,6 +495,7 @@ void Translator::Update(const CameraComponent& camera, const XMFLOAT4& currentMo
dragEnded = true;
}
dragging = false;
state = TRANSLATOR_IDLE;
}
}
void Translator::Draw(const CameraComponent& camera, const XMFLOAT4& currentMouse, CommandList cmd) const
+2 -3
View File
@@ -1669,6 +1669,8 @@ namespace wi::terrain
for (const VirtualTexture* vt : virtual_textures_in_use)
{
if (vt->update_requests.empty())
continue;
for (uint32_t map_type = 0; map_type < arraysize(atlas.maps); map_type++)
{
switch (map_type)
@@ -1761,9 +1763,6 @@ namespace wi::terrain
}
}
}
}
for (const VirtualTexture* vt : virtual_textures_in_use)
{
vt->update_requests.clear();
}
device->EventEnd(cmd);