feat(mesh): update Vertex layout, add mesh loader
Refactored Vertex to use float3 position/normal, float2 uv, float4 tangent, and Color128 color, updating all mesh generation and HLSL code accordingly. Added MeshUtility for loading .obj/.fbx meshes with deduplication and normal/tangent computation. Updated GraphicsTestWindow to use the new loader and improved resource management. Fixed D3D12ResourceAllocator resource creation logic, improved camera projection math, and simplified RenderingLayerMask. Updated package references and app display name. BREAKING CHANGE: Vertex struct layout changed; all mesh code and shaders must use the new format.
This commit is contained in:
@@ -132,7 +132,7 @@ public struct Color128 : IEquatable<Color128>
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Vertex
|
||||
public record struct Vertex
|
||||
{
|
||||
public static class Semantic
|
||||
{
|
||||
@@ -145,11 +145,11 @@ public struct Vertex
|
||||
public static readonly FixedText32 Color = new("COLOR"u8);
|
||||
}
|
||||
|
||||
public float4 position;
|
||||
public float4 normal;
|
||||
public float4 tangent;
|
||||
public float4 uv;
|
||||
public Color128 color;
|
||||
public float4 tangent;
|
||||
public float3 position;
|
||||
public float3 normal;
|
||||
public float2 uv;
|
||||
}
|
||||
|
||||
public readonly struct ShaderVariant;
|
||||
|
||||
Reference in New Issue
Block a user