forked from Misaki/GhostEngine
Refactor: variant-aware shader/material pipeline overhaul
Major architectural update to graphics/material/shader system: - Introduced strongly-typed key structs (Key64/Key128) for passes, variants, and pipelines; removed legacy key types. - Implemented robust hashing and key generation utilities for efficient variant and pipeline lookup/caching. - Shader compiler now compiles/caches all keyword variants using new key system; includes handled as lists. - Switched to push constant root signature for per-draw data; updated HLSL and C# codegen accordingly. - Refactored Material, Shader, and Pass data structures for cache efficiency and variant support. - Pipeline library and PSO management now use 128-bit keys and variant-specific caching. - Replaced WorldNode with SceneNode in editor/scene graph; introduced ComponentManager for archetype/query management. - Migrated math utilities to Misaki.HighPerformance.Mathematics; updated editor controls. - Updated all HLSL and codegen for new buffer/push constant layouts and macros. - Misc: project reference cleanup, D3D12 Work Graph support, doc updates, and code modernization.
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System.Numerics;
|
||||
using Misaki.HighPerformance.Mathematics;
|
||||
|
||||
namespace Ghost.Editor.Core.Controls;
|
||||
|
||||
[TemplatePart(Name = "XComponent", Type = typeof(NumberBox))]
|
||||
[TemplatePart(Name = "YComponent", Type = typeof(NumberBox))]
|
||||
[TemplatePart(Name = "ZComponent", Type = typeof(NumberBox))]
|
||||
public sealed partial class Vector3Field : ValueControl<Vector3>
|
||||
public sealed partial class Float3Field : ValueControl<float3>
|
||||
{
|
||||
private NumberBox? _xComponent;
|
||||
private NumberBox? _yComponent;
|
||||
private NumberBox? _zComponent;
|
||||
|
||||
public Vector3Field()
|
||||
public Float3Field()
|
||||
{
|
||||
DefaultStyleKey = typeof(Vector3Field);
|
||||
DefaultStyleKey = typeof(Float3Field);
|
||||
}
|
||||
|
||||
protected override void ValueChanged(Vector3 oldValue, Vector3 newValue)
|
||||
protected override void ValueChanged(float3 oldValue, float3 newValue)
|
||||
{
|
||||
SyncFromValue();
|
||||
}
|
||||
@@ -45,9 +45,9 @@ public sealed partial class Vector3Field : ValueControl<Vector3>
|
||||
private void SyncFromValue()
|
||||
{
|
||||
SuppressChangedEvent = true;
|
||||
_xComponent?.Value = Value.X;
|
||||
_yComponent?.Value = Value.Y;
|
||||
_zComponent?.Value = Value.Z;
|
||||
_xComponent?.Value = Value.x;
|
||||
_yComponent?.Value = Value.y;
|
||||
_zComponent?.Value = Value.z;
|
||||
SuppressChangedEvent = false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public sealed partial class Vector3Field : ValueControl<Vector3>
|
||||
return;
|
||||
}
|
||||
|
||||
var newValue = new Vector3(
|
||||
var newValue = new float3(
|
||||
(float)(_xComponent?.Value ?? 0),
|
||||
(float)(_yComponent?.Value ?? 0),
|
||||
(float)(_zComponent?.Value ?? 0));
|
||||
@@ -66,4 +66,4 @@ public sealed partial class Vector3Field : ValueControl<Vector3>
|
||||
RiseChangedEvent(Value, newValue);
|
||||
Value = newValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user