Merge remote-tracking branch 'origin/1.1' into linux-editor

# Conflicts:
#	Source/FlaxEngine.Gen.cs
#	Source/Tools/Flax.Build/Utilities/Utilities.cs
This commit is contained in:
Wojtek Figat
2021-02-16 18:54:25 +01:00
654 changed files with 19651 additions and 10556 deletions

View File

@@ -3,6 +3,7 @@
#include "ShaderAssetBase.h"
#include "ShaderStorage.h"
#include "ShaderCacheManager.h"
#include "Engine/Engine/CommandLine.h"
#include "Engine/Serialization/MemoryReadStream.h"
#include "Engine/ShadowsOfMordor/AtlasChartsPacker.h"
@@ -225,8 +226,11 @@ bool ShaderAssetBase::LoadShaderCache(ShaderCacheResult& result)
options.SourceLength = sourceLength;
options.Profile = shaderProfile;
options.Output = &cacheStream;
//options.GenerateDebugData = true;
//options.NoOptimize = true;
if (CommandLine::Options.ShaderDebug)
{
options.GenerateDebugData = true;
options.NoOptimize = true;
}
auto& platformDefine = options.Macros.AddOne();
#if PLATFORM_WINDOWS
platformDefine.Name = "PLATFORM_WINDOWS";

View File

@@ -97,7 +97,7 @@ public:
/// <summary>
/// Gets the vertex shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramVS* GetVS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -108,7 +108,7 @@ public:
/// <summary>
/// Gets the hull shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramHS* GetHS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -119,7 +119,7 @@ public:
/// <summary>
/// Gets domain shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramDS* GetDS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -130,7 +130,7 @@ public:
/// <summary>
/// Gets the geometry shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramGS* GetGS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -141,7 +141,7 @@ public:
/// <summary>
/// Gets the pixel shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramPS* GetPS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -152,7 +152,7 @@ public:
/// <summary>
/// Gets the compute shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns>The shader object.</returns>
API_FUNCTION() FORCE_INLINE GPUShaderProgramCS* GetCS(const StringAnsiView& name, int32 permutationIndex = 0) const
@@ -176,7 +176,7 @@ public:
/// <summary>
/// Determines whether the specified shader program is in the shader.
/// </summary>
/// <param name="name">Thr shader program name.</param>
/// <param name="name">The shader program name.</param>
/// <param name="permutationIndex">The shader permutation index.</param>
/// <returns><c>true</c> if the shader is valid; otherwise, <c>false</c>.</returns>
FORCE_INLINE bool HasShader(const StringAnsiView& name, int32 permutationIndex = 0) const