Merge remote-tracking branch 'origin/master' into gi
# Conflicts: # Flax.flaxproj # Source/Engine/Core/Math/Vector3.h # Source/Engine/Graphics/Textures/GPUTexture.cpp # Source/Engine/GraphicsDevice/DirectX/DX11/GPUContextDX11.cpp # Source/Engine/Terrain/Terrain.cpp # Source/Engine/Tools/ModelTool/ModelTool.Build.cs # Source/FlaxEngine.Gen.cs # Source/FlaxEngine.Gen.h
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "Engine/Content/Assets/Shader.h"
|
||||
#include "Engine/Content/Assets/Material.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
#include "Engine/Content/SoftAssetReference.h"
|
||||
#include "Engine/Platform/Windows/WindowsWindow.h"
|
||||
#include "Engine/Render2D/Render2D.h"
|
||||
#include "Engine/Engine/CommandLine.h"
|
||||
@@ -19,7 +20,6 @@
|
||||
#include "Engine/Profiler/Profiler.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Core/Utilities.h"
|
||||
#include "Engine/Scripting/SoftObjectReference.h"
|
||||
|
||||
GPUPipelineState* GPUPipelineState::Spawn(const SpawnParams& params)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ struct GPUDevice::PrivateData
|
||||
GPUPipelineState* PS_Clear = nullptr;
|
||||
GPUBuffer* FullscreenTriangleVB = nullptr;
|
||||
AssetReference<Material> DefaultMaterial;
|
||||
SoftObjectReference<Material> DefaultDeformableMaterial;
|
||||
SoftAssetReference<Material> DefaultDeformableMaterial;
|
||||
AssetReference<Texture> DefaultNormalMap;
|
||||
AssetReference<Texture> DefaultWhiteTexture;
|
||||
AssetReference<Texture> DefaultBlackTexture;
|
||||
|
||||
@@ -9,7 +9,7 @@ BlendShapesInstance::MeshInstance::MeshInstance()
|
||||
: IsUsed(false)
|
||||
, IsDirty(false)
|
||||
, DirtyMinVertexIndex(0)
|
||||
, DirtyMaxVertexIndex(MAX_uint32)
|
||||
, DirtyMaxVertexIndex(MAX_uint32 - 1)
|
||||
, VertexBuffer(0, sizeof(VB0SkinnedElementType), TEXT("Skinned Mesh Blend Shape"))
|
||||
{
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void BlendShapesInstance::Update(SkinnedModel* skinnedModel)
|
||||
// Initialize the dynamic vertex buffer data (use the dirty range from the previous update to be cleared with initial data)
|
||||
instance.VertexBuffer.Data.Resize(vertexBuffer.Length());
|
||||
const uint32 dirtyVertexDataStart = instance.DirtyMinVertexIndex * sizeof(VB0SkinnedElementType);
|
||||
const uint32 dirtyVertexDataLength = Math::Min<uint32>(instance.DirtyMaxVertexIndex - instance.DirtyMinVertexIndex, vertexCount) * sizeof(VB0SkinnedElementType);
|
||||
const uint32 dirtyVertexDataLength = Math::Min<uint32>(instance.DirtyMaxVertexIndex - instance.DirtyMinVertexIndex + 1, vertexCount) * sizeof(VB0SkinnedElementType);
|
||||
Platform::MemoryCopy(instance.VertexBuffer.Data.Get() + dirtyVertexDataStart, vertexBuffer.Get() + dirtyVertexDataStart, dirtyVertexDataLength);
|
||||
|
||||
// Blend all blend shapes
|
||||
|
||||
@@ -589,6 +589,17 @@ void MeshData::Merge(MeshData& other)
|
||||
}
|
||||
}
|
||||
|
||||
bool MaterialSlotEntry::UsesProperties() const
|
||||
{
|
||||
return Diffuse.Color != Color::White ||
|
||||
Diffuse.TextureIndex != -1 ||
|
||||
Emissive.Color != Color::Transparent ||
|
||||
Emissive.TextureIndex != -1 ||
|
||||
!Math::IsOne(Opacity.Value) ||
|
||||
Opacity.TextureIndex != -1 ||
|
||||
Normals.TextureIndex != -1;
|
||||
}
|
||||
|
||||
void ModelData::CalculateLODsScreenSizes()
|
||||
{
|
||||
const float autoComputeLodPowerBase = 0.5f;
|
||||
|
||||
@@ -373,16 +373,7 @@ struct FLAXENGINE_API MaterialSlotEntry
|
||||
|
||||
bool TwoSided = false;
|
||||
|
||||
bool UsesProperties() const
|
||||
{
|
||||
return Diffuse.Color != Color::White ||
|
||||
Diffuse.TextureIndex != -1 ||
|
||||
Emissive.Color != Color::Transparent ||
|
||||
Emissive.TextureIndex != -1 ||
|
||||
!Math::IsOne(Opacity.Value) ||
|
||||
Opacity.TextureIndex != -1 ||
|
||||
Normals.TextureIndex != -1;
|
||||
}
|
||||
bool UsesProperties() const;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "PixelFormatExtensions.h"
|
||||
#include "Engine/Core/Collections/Dictionary.h"
|
||||
#include "Engine/Core/Math/Math.h"
|
||||
|
||||
// ReSharper disable CppClangTidyClangDiagnosticSwitchEnum
|
||||
|
||||
Reference in New Issue
Block a user