Merge remote-tracking branch 'origin/master' into 1.9
# Conflicts: # Content/Editor/Camera/M_Camera.flax # Content/Editor/CubeTexturePreviewMaterial.flax # Content/Editor/DebugMaterials/DDGIDebugProbes.flax # Content/Editor/DebugMaterials/SingleColor/Decal.flax # Content/Editor/DebugMaterials/SingleColor/Particle.flax # Content/Editor/DebugMaterials/SingleColor/Surface.flax # Content/Editor/DebugMaterials/SingleColor/SurfaceAdditive.flax # Content/Editor/DebugMaterials/SingleColor/Terrain.flax # Content/Editor/DefaultFontMaterial.flax # Content/Editor/Gizmo/FoliageBrushMaterial.flax # Content/Editor/Gizmo/Material.flax # Content/Editor/Gizmo/MaterialWire.flax # Content/Editor/Gizmo/SelectionOutlineMaterial.flax # Content/Editor/Gizmo/VertexColorsPreviewMaterial.flax # Content/Editor/Highlight Material.flax # Content/Editor/Icons/IconsMaterial.flax # Content/Editor/IesProfilePreviewMaterial.flax # Content/Editor/Particles/Particle Material Color.flax # Content/Editor/Particles/Smoke Material.flax # Content/Editor/SpriteMaterial.flax # Content/Editor/Terrain/Circle Brush Material.flax # Content/Editor/Terrain/Highlight Terrain Material.flax # Content/Editor/TexturePreviewMaterial.flax # Content/Editor/Wires Debug Material.flax # Content/Engine/DefaultDeformableMaterial.flax # Content/Engine/DefaultMaterial.flax # Content/Engine/DefaultTerrainMaterial.flax # Content/Engine/SingleColorMaterial.flax # Content/Engine/SkyboxMaterial.flax # Source/Engine/Graphics/Materials/MaterialShader.h
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
/// <summary>
|
||||
/// The asset references. Linked resources such as Animation assets are referenced in graph data as ID. We need to keep valid refs to them at runtime to keep data in memory.
|
||||
/// </summary>
|
||||
AssetReference<Asset> Assets[14];
|
||||
Array<AssetReference<Asset>> Assets;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -177,6 +177,7 @@ public:
|
||||
// Get Gameplay Global
|
||||
case GRAPH_NODE_MAKE_TYPE(7, 16):
|
||||
{
|
||||
node->Assets.Resize(1);
|
||||
node->Assets[0] = Content::LoadAsync<Asset>((Guid)node->Values[0]);
|
||||
break;
|
||||
}
|
||||
@@ -296,6 +297,7 @@ public:
|
||||
break;
|
||||
// Particle Emitter Function
|
||||
case GRAPH_NODE_MAKE_TYPE(14, 300):
|
||||
node->Assets.Resize(1);
|
||||
InitParticleEmitterFunctionCall((Guid)node->Values[0], node->Assets[0], node->UsesParticleData, Layout);
|
||||
break;
|
||||
// Particle Index
|
||||
@@ -447,6 +449,7 @@ public:
|
||||
// Sprite Rendering
|
||||
case GRAPH_NODE_MAKE_TYPE(15, 400):
|
||||
{
|
||||
node->Assets.Resize(1);
|
||||
node->Assets[0] = Content::LoadAsync<Asset>((Guid)node->Values[2]);
|
||||
USE_ATTRIBUTE(Position, Float3, 0);
|
||||
USE_ATTRIBUTE(Rotation, Float3, 1);
|
||||
@@ -484,6 +487,7 @@ public:
|
||||
// Model Rendering
|
||||
case GRAPH_NODE_MAKE_TYPE(15, 403):
|
||||
{
|
||||
node->Assets.Resize(2);
|
||||
node->Assets[0] = Content::LoadAsync<Asset>((Guid)node->Values[2]);
|
||||
node->Assets[1] = Content::LoadAsync<Asset>((Guid)node->Values[3]);
|
||||
USE_ATTRIBUTE(Position, Float3, 0);
|
||||
@@ -494,6 +498,7 @@ public:
|
||||
// Ribbon Rendering
|
||||
case GRAPH_NODE_MAKE_TYPE(15, 404):
|
||||
{
|
||||
node->Assets.Resize(1);
|
||||
node->Assets[0] = Content::LoadAsync<Asset>((Guid)node->Values[2]);
|
||||
USE_ATTRIBUTE(Position, Float3, 0);
|
||||
// TODO: add support for custom sorting key - not only by age
|
||||
@@ -503,6 +508,7 @@ public:
|
||||
// Volumetric Fog Rendering
|
||||
case GRAPH_NODE_MAKE_TYPE(15, 405):
|
||||
{
|
||||
node->Assets.Resize(1);
|
||||
node->Assets[0] = Content::LoadAsync<Asset>((Guid)node->Values[2]);
|
||||
USE_ATTRIBUTE(Position, Float3, 0);
|
||||
USE_ATTRIBUTE(Radius, Float, 1);
|
||||
|
||||
@@ -270,11 +270,11 @@ void ParticleEffect::UpdateSimulation(bool singleFrame)
|
||||
if (!IsActiveInHierarchy()
|
||||
|| ParticleSystem == nullptr
|
||||
|| !ParticleSystem->IsLoaded()
|
||||
|| _lastUpdateFrame == Engine::FrameCount)
|
||||
|| _lastUpdateFrame == Engine::UpdateCount)
|
||||
return;
|
||||
|
||||
// Request update
|
||||
_lastUpdateFrame = Engine::FrameCount;
|
||||
_lastUpdateFrame = Engine::UpdateCount;
|
||||
_lastMinDstSqr = MAX_Real;
|
||||
if (singleFrame)
|
||||
Instance.LastUpdateTime = (UseTimeScale ? Time::Update.Time : Time::Update.UnscaledTime).GetTotalSeconds();
|
||||
@@ -371,7 +371,7 @@ void ParticleEffect::Sync()
|
||||
|
||||
SceneRenderTask* ParticleEffect::GetRenderTask() const
|
||||
{
|
||||
const uint64 minFrame = Engine::FrameCount - 2;
|
||||
const uint64 minFrame = Engine::UpdateCount - 2;
|
||||
|
||||
// Custom task
|
||||
const auto customViewRenderTask = CustomViewRenderTask.Get();
|
||||
|
||||
Reference in New Issue
Block a user