diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml
index b3348c288..6290ff525 100644
--- a/.github/workflows/build_linux.yml
+++ b/.github/workflows/build_linux.yml
@@ -10,15 +10,12 @@ jobs:
# Editor
editor-linux:
name: Editor (Linux, Development x64)
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-24.04"
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
- sudo apt-get update
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
- name: Setup Vulkan
uses: ./.github/actions/vulkan
@@ -41,7 +38,7 @@ jobs:
# Game
game-linux:
name: Game (Linux, Release x64)
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-24.04"
steps:
- name: Checkout repo
uses: actions/checkout@v3
diff --git a/.github/workflows/build_linux_sources.list b/.github/workflows/build_linux_sources.list
deleted file mode 100644
index 4d8f94f35..000000000
--- a/.github/workflows/build_linux_sources.list
+++ /dev/null
@@ -1,4 +0,0 @@
-deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
-deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
-deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
-deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index d83b40363..4b4f9a827 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -76,7 +76,7 @@ jobs:
# Linux
package-linux-editor:
name: Editor (Linux)
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-24.04"
steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -86,9 +86,6 @@ jobs:
git lfs pull
- name: Install dependencies
run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
- sudo apt-get update
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
- name: Setup Vulkan
uses: ./.github/actions/vulkan
@@ -110,7 +107,7 @@ jobs:
path: Output/FlaxEditorLinux.zip
package-linux-game:
name: Game (Linux)
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-24.04"
steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -120,9 +117,6 @@ jobs:
git lfs pull
- name: Install dependencies
run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
- sudo apt-get update
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
- name: Setup Vulkan
uses: ./.github/actions/vulkan
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index e36642cdf..b828974a0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -10,7 +10,7 @@ jobs:
# Tests on Linux
tests-linux:
name: Tests (Linux)
- runs-on: "ubuntu-20.04"
+ runs-on: "ubuntu-24.04"
steps:
- name: Checkout repo
uses: actions/checkout@v3
@@ -28,9 +28,6 @@ jobs:
git lfs pull
- name: Install dependencies
run: |
- sudo rm -f /etc/apt/sources.list.d/*
- sudo cp -f .github/workflows/build_linux_sources.list /etc/apt/sources.list
- sudo apt-get update
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev
- name: Build
run: |
diff --git a/Flax.flaxproj b/Flax.flaxproj
index ca1a1aff8..33dc6e45b 100644
--- a/Flax.flaxproj
+++ b/Flax.flaxproj
@@ -4,7 +4,7 @@
"Major": 1,
"Minor": 9,
"Revision": 0,
- "Build": 6604
+ "Build": 6605
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.",
diff --git a/Source/Editor/Cooker/Steps/DeployDataStep.cpp b/Source/Editor/Cooker/Steps/DeployDataStep.cpp
index 84a36e5c6..ff22247ef 100644
--- a/Source/Editor/Cooker/Steps/DeployDataStep.cpp
+++ b/Source/Editor/Cooker/Steps/DeployDataStep.cpp
@@ -275,7 +275,7 @@ bool DeployDataStep::Perform(CookingData& data)
DEPLOY_NATIVE_FILE("libmonosgen-2.0.dylib");
DEPLOY_NATIVE_FILE("libSystem.IO.Compression.Native.dylib");
DEPLOY_NATIVE_FILE("libSystem.Native.dylib");
- DEPLOY_NATIVE_FILE("libSystem.NET.Security.Native.dylib");
+ DEPLOY_NATIVE_FILE("libSystem.Net.Security.Native.dylib");
DEPLOY_NATIVE_FILE("libSystem.Security.Cryptography.Native.Apple.dylib");
break;
#undef DEPLOY_NATIVE_FILE
diff --git a/Source/Editor/Modules/WindowsModule.cs b/Source/Editor/Modules/WindowsModule.cs
index 02dd6d151..b9f3e246b 100644
--- a/Source/Editor/Modules/WindowsModule.cs
+++ b/Source/Editor/Modules/WindowsModule.cs
@@ -950,7 +950,7 @@ namespace FlaxEditor.Modules
MainWindow = null;
// Capture project icon screenshot (not in play mode and if editor was used for some time)
- if (!Editor.StateMachine.IsPlayMode && Time.TimeSinceStartup >= 5.0f)
+ if (!Editor.StateMachine.IsPlayMode && Time.TimeSinceStartup >= 5.0f && GPUDevice.Instance?.RendererType != RendererType.Null)
{
Editor.Log("Capture project icon screenshot");
_projectIconScreenshotTimeout = Time.TimeSinceStartup + 0.8f; // wait 800ms for a screenshot task
diff --git a/Source/Engine/Core/Math/Color32.h b/Source/Engine/Core/Math/Color32.h
index 48910131f..17d5d65d1 100644
--- a/Source/Engine/Core/Math/Color32.h
+++ b/Source/Engine/Core/Math/Color32.h
@@ -80,12 +80,12 @@ public:
public:
bool operator==(const Color32& other) const
{
- return R == other.R && G == other.G && B == other.B && A == other.A;
+ return Raw == other.Raw;
}
bool operator!=(const Color32& other) const
{
- return R != other.R || G != other.G || B != other.B || A != other.A;
+ return Raw != other.Raw;
}
Color32 operator+(const Color32& b) const
@@ -138,7 +138,7 @@ public:
// Returns true if color is fully transparent (all components are equal zero).
bool IsTransparent() const
{
- return R + G + B + A == 0;
+ return Raw == 0;
}
// Returns true if color has opacity channel in use (different from 255).
@@ -222,7 +222,7 @@ namespace Math
{
FORCE_INLINE static bool NearEqual(const Color32& a, const Color32& b)
{
- return a == b;
+ return a.Raw == b.Raw;
}
}
diff --git a/Source/Engine/Level/Actors/Light.h b/Source/Engine/Level/Actors/Light.h
index 3138d996f..bcb914740 100644
--- a/Source/Engine/Level/Actors/Light.h
+++ b/Source/Engine/Level/Actors/Light.h
@@ -173,8 +173,8 @@ public:
///
/// Frequency of shadow updates at the maximum distance from the view at which shadows are still rendered. This value is multiplied by ShadowsUpdateRate and allows scaling the update rate in-between the shadow range. For example, if light is near view, it will get normal shadow updates but will reduce this rate when far from view. See ShadowsUpdateRate to learn more.
///
- API_FIELD(Attributes="EditorOrder(105), EditorDisplay(\"Shadow\", \"Update Rate At Distance\"), Limit(0.0f, 1.0f)")
- float ShadowsUpdateRateAtDistance = 0.5f;
+ API_FIELD(Attributes="EditorOrder(101), EditorDisplay(\"Shadow\", \"Update Rate At Distance\"), Limit(0.0f, 1.0f)")
+ float ShadowsUpdateRateAtDistance = 1.0f;
///
/// Defines the resolution of the shadow map texture used to draw objects projection from light-point-of-view. Higher values increase shadow quality at cost of performance.
diff --git a/Source/Engine/Renderer/ShadowsPass.cpp b/Source/Engine/Renderer/ShadowsPass.cpp
index b30005b51..0487d7ce2 100644
--- a/Source/Engine/Renderer/ShadowsPass.cpp
+++ b/Source/Engine/Renderer/ShadowsPass.cpp
@@ -330,6 +330,7 @@ public:
for (auto it = Lights.Begin(); it.IsNotEnd(); ++it)
{
auto& atlasLight = it->Value;
+ atlasLight.StaticState = ShadowAtlasLight::Unused;
atlasLight.Cache.StaticValid = false;
for (int32 i = 0; i < atlasLight.TilesCount; i++)
atlasLight.Tiles[i].ClearDynamic();
@@ -370,7 +371,8 @@ public:
for (auto& e : Lights)
{
auto& atlasLight = e.Value;
- if (atlasLight.StaticState == ShadowAtlasLight::CopyStaticShadow && atlasLight.Bounds.Intersects(bounds))
+ if ((atlasLight.StaticState == ShadowAtlasLight::CopyStaticShadow || atlasLight.StaticState == ShadowAtlasLight::NoStaticGeometry)
+ && atlasLight.Bounds.Intersects(bounds))
{
// Invalidate static shadow
atlasLight.Cache.StaticValid = false;
@@ -719,8 +721,14 @@ bool ShadowsPass::SetupLight(ShadowsCustomBuffer& shadows, RenderContext& render
}
switch (atlasLight.StaticState)
{
- case ShadowAtlasLight::CopyStaticShadow:
case ShadowAtlasLight::NoStaticGeometry:
+ // Light was modified so attempt to find the static shadow again
+ if (!atlasLight.Cache.StaticValid && atlasLight.HasStaticShadowContext)
+ {
+ atlasLight.StaticState = ShadowAtlasLight::WaitForGeometryCheck;
+ break;
+ }
+ case ShadowAtlasLight::CopyStaticShadow:
case ShadowAtlasLight::FailedToInsertTiles:
// Skip collecting static draws
atlasLight.HasStaticShadowContext = false;
@@ -728,7 +736,7 @@ bool ShadowsPass::SetupLight(ShadowsCustomBuffer& shadows, RenderContext& render
}
if (atlasLight.HasStaticShadowContext)
{
- // If rendering finds any static draws then it's set to true
+ // If rendering finds any static draws then it will be set to true
for (auto& tile : atlasLight.Tiles)
tile.HasStaticGeometry = false;
}
@@ -1367,7 +1375,7 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
const ShadowsCustomBuffer* shadowsPtr = renderContext.Buffers->FindCustomBuffer(TEXT("Shadows"), false);
if (shadowsPtr == nullptr || shadowsPtr->Lights.IsEmpty() || shadowsPtr->LastFrameUsed != Engine::FrameCount)
return;
- PROFILE_GPU_CPU("ShadowMaps");
+ PROFILE_GPU_CPU("Shadow Maps");
const ShadowsCustomBuffer& shadows = *shadowsPtr;
GPUContext* context = GPUDevice::Instance->GetMainContext();
context->ResetSR();
@@ -1384,9 +1392,29 @@ void ShadowsPass::RenderShadowMaps(RenderContextBatch& renderContextBatch)
for (auto& e : shadows.Lights)
{
ShadowAtlasLight& atlasLight = e.Value;
- if (atlasLight.StaticState != ShadowAtlasLight::UpdateStaticShadow || !atlasLight.HasStaticShadowContext || atlasLight.ContextCount == 0)
+ if (!atlasLight.HasStaticShadowContext || atlasLight.ContextCount == 0)
continue;
int32 contextIndex = 0;
+
+ if (atlasLight.StaticState == ShadowAtlasLight::WaitForGeometryCheck)
+ {
+ // Check for any static geometry to use in static shadow map
+ for (int32 tileIndex = 0; tileIndex < atlasLight.TilesCount; tileIndex++)
+ {
+ ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
+ contextIndex++; // Skip dynamic context
+ auto& shadowContextStatic = renderContextBatch.Contexts[atlasLight.ContextIndex + contextIndex++];
+ if (!shadowContextStatic.List->DrawCallsLists[(int32)DrawCallsListType::Depth].IsEmpty() || !shadowContextStatic.List->ShadowDepthDrawCallsList.IsEmpty())
+ {
+ tile.HasStaticGeometry = true;
+ }
+ }
+ }
+
+ if (atlasLight.StaticState != ShadowAtlasLight::UpdateStaticShadow)
+ continue;
+
+ contextIndex = 0;
for (int32 tileIndex = 0; tileIndex < atlasLight.TilesCount; tileIndex++)
{
ShadowAtlasLightTile& tile = atlasLight.Tiles[tileIndex];
diff --git a/Source/Platforms/Linux/Binaries/ThirdParty/x64/libIrrXML.a b/Source/Platforms/Linux/Binaries/ThirdParty/x64/libIrrXML.a
deleted file mode 100644
index 92c1baf0b..000000000
--- a/Source/Platforms/Linux/Binaries/ThirdParty/x64/libIrrXML.a
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4eb25101716011a5b4c872c5cd303c3292a61e5f661e9296d95502b5705e2e53
-size 181458
diff --git a/Source/Platforms/Linux/Binaries/ThirdParty/x64/libassimp.a b/Source/Platforms/Linux/Binaries/ThirdParty/x64/libassimp.a
index 4dccc7f4b..92b3c5545 100644
--- a/Source/Platforms/Linux/Binaries/ThirdParty/x64/libassimp.a
+++ b/Source/Platforms/Linux/Binaries/ThirdParty/x64/libassimp.a
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:8cbd73a154e270cc03d3da292b2c3cc73ee473b221f43722d060dc114916d6d5
-size 7996212
+oid sha256:b3510d6c5585f08fc9fcbf2044bb0dc0238e2501c1914e3b98aef36bc8cd2711
+size 10303430
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libIrrXML.a b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libIrrXML.a
deleted file mode 100644
index 6bcd58a96..000000000
--- a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libIrrXML.a
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6aa0849de08ac7f7332c63941b6ed028c329971b7d0ce9de44580e46b7560f2d
-size 519048
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libassimp.a b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libassimp.a
index 622b54e48..0aeab8ca5 100644
--- a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libassimp.a
+++ b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libassimp.a
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:05ed7fbba9701903c4d488eebda74ff71316af984bda5b125ff4822e53c05f3a
-size 66547240
+oid sha256:512690a2639b29649b19531e8f24f0e50600c5c225c674568d28e168b5078838
+size 7427096
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libIrrXML.a b/Source/Platforms/Mac/Binaries/ThirdParty/x64/libIrrXML.a
deleted file mode 100644
index 792b3daf5..000000000
--- a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libIrrXML.a
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4b67f00759cb59c91e5fe3fcf8bc107c6ac5f54c1929cea246892298ec40f6ec
-size 543624
diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libassimp.a b/Source/Platforms/Mac/Binaries/ThirdParty/x64/libassimp.a
index da1ab7c0b..ae7e0edd9 100644
--- a/Source/Platforms/Mac/Binaries/ThirdParty/x64/libassimp.a
+++ b/Source/Platforms/Mac/Binaries/ThirdParty/x64/libassimp.a
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ead9834575a8b7dcab9f8539b59342a850d72d968ab4bdf6e1775510c7a38659
+oid sha256:1fc8320db7b98865e00e750277dec9aff82a3842454cb784d944c44b4aacfcbc
size 7830128
diff --git a/Source/ThirdParty/assimp/assimp.Build.cs b/Source/ThirdParty/assimp/assimp.Build.cs
index dc0f0f06c..2276ca2e2 100644
--- a/Source/ThirdParty/assimp/assimp.Build.cs
+++ b/Source/ThirdParty/assimp/assimp.Build.cs
@@ -37,7 +37,6 @@ public class assimp : DepsModule
case TargetPlatform.Linux:
case TargetPlatform.Mac:
options.OutputFiles.Add(Path.Combine(depsRoot, "libassimp.a"));
- options.OutputFiles.Add(Path.Combine(depsRoot, "libIrrXML.a"));
break;
default: throw new InvalidPlatformException(options.Platform.Target);
}
diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/Assimp.cs b/Source/Tools/Flax.Build/Deps/Dependencies/Assimp.cs
index 3cc1bacf0..652bbccb9 100644
--- a/Source/Tools/Flax.Build/Deps/Dependencies/Assimp.cs
+++ b/Source/Tools/Flax.Build/Deps/Dependencies/Assimp.cs
@@ -1,6 +1,6 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
-using System;
+using System.Collections.Generic;
using System.IO;
using Flax.Build;
@@ -122,13 +122,19 @@ namespace Flax.Deps.Dependencies
}
case TargetPlatform.Linux:
{
+ var envVars = new Dictionary
+ {
+ { "CC", "clang-13" },
+ { "CC_FOR_BUILD", "clang-13" },
+ { "CXX", "clang++-13" },
+ };
+
// Build for Linux
- RunCmake(root, platform, TargetArchitecture.x64, " -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF " + globalConfig);
- Utilities.Run("make", null, null, root, Utilities.RunOptions.ThrowExceptionOnError);
+ RunCmake(root, platform, TargetArchitecture.x64, " -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF " + globalConfig, envVars);
+ Utilities.Run("make", null, null, root, Utilities.RunOptions.ThrowExceptionOnError, envVars);
configHeaderFilePath = Path.Combine(root, "include", "assimp", "config.h");
var depsFolder = GetThirdPartyFolder(options, platform, TargetArchitecture.x64);
Utilities.FileCopy(Path.Combine(root, "lib", "libassimp.a"), Path.Combine(depsFolder, "libassimp.a"));
- Utilities.FileCopy(Path.Combine(root, "lib", "libIrrXML.a"), Path.Combine(depsFolder, "libIrrXML.a"));
break;
}
case TargetPlatform.Mac:
@@ -141,7 +147,7 @@ namespace Flax.Deps.Dependencies
configHeaderFilePath = Path.Combine(root, "include", "assimp", "config.h");
var depsFolder = GetThirdPartyFolder(options, platform, architecture);
Utilities.FileCopy(Path.Combine(root, "lib", "libassimp.a"), Path.Combine(depsFolder, "libassimp.a"));
- Utilities.FileCopy(Path.Combine(root, "lib", "libIrrXML.a"), Path.Combine(depsFolder, "libIrrXML.a"));
+ Utilities.Run("make", "clean", null, root, Utilities.RunOptions.ThrowExceptionOnError);
}
break;
}