- Introduced `Handle<T>` and `Identifier<T>` for lightweight, strongly-typed resource identifiers. - Replaced `BitSet` with `UnsafeBitSet` for improved performance and memory safety. - Refactored `Mesh` and `Material` into `MeshClass` and `MaterialClass` for better GPU resource handling. - Added `D3D12ResourceDatabase` to centralize GPU resource tracking and lifecycle management. - Updated `D3D12ShaderCompiler` to load shaders from disk and dynamically populate constant buffers and textures. - Enhanced `ICommandBuffer` with new upload operations for buffers and textures. - Refactored `Vertex` struct for simplified memory layout and better performance. - Updated `MeshBuilder` and rendering logic to align with new resource and shader structures. - Added `BindlessDescriptor` support to `TextureHandle` and `BufferHandle`. - Removed unused classes and performed general cleanup. - Updated unit tests and demos to reflect the new architecture.
28 lines
901 B
C#
28 lines
901 B
C#
using Misaki.HighPerformance.LowLevel.Collections;
|
|
using Misaki.HighPerformance.Mathematics;
|
|
using System.Runtime.InteropServices;
|
|
using Win32.Graphics.Dxgi.Common;
|
|
|
|
namespace Ghost.Graphics.Data;
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct Vertex
|
|
{
|
|
public unsafe static class Semantic
|
|
{
|
|
public const Format ALIGNED_FORMAT = Format.R32G32B32A32Float;
|
|
public const int COUNT = 5;
|
|
|
|
public static readonly FixedString32 position = new("POSITION");
|
|
public static readonly FixedString32 normal = new("NORMAL");
|
|
public static readonly FixedString32 tangent = new("TANGENT");
|
|
public static readonly FixedString32 uv = new("TEXCOORD");
|
|
public static readonly FixedString32 color = new("COLOR");
|
|
}
|
|
|
|
public float4 position;
|
|
public float4 normal;
|
|
public float4 tangent;
|
|
public float4 uv;
|
|
public Color128 color;
|
|
} |