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:
2026-04-01 00:06:31 +09:00
parent 89e6c68f2a
commit 0b6e5b8501
15 changed files with 282 additions and 109 deletions

View File

@@ -29,11 +29,12 @@ shader "MyShader/Standard"
hlsl
{
#line 31 "MyShader_Standard_Forward_hlsl_block"
struct PixelInput
{
float4 position : SV_POSITION;
float4 color : COLOR;
float4 uv : TEXCOORD0;
float2 uv : TEXCOORD0;
nointerpolation uint meshletID : MESHLET_ID;
};
@@ -72,9 +73,9 @@ shader "MyShader/Standard"
float4 worldPos = mul(instanceData.localToWorld, float4(v.position.xyz, 1.0f));
float4 viewPos = mul(viewData.viewMatrix, worldPos);
// outVerts[groupThreadID.x].position = mul(viewData.projectionMatrix, viewPos);
outVerts[groupThreadID.x].position = mul(viewData.projectionMatrix, viewPos);
// For testing.
outVerts[groupThreadID.x].position = float4(v.position.xyz, 1.0f);
// outVerts[groupThreadID.x].position = v.position.xyz;
outVerts[groupThreadID.x].color = v.color;
outVerts[groupThreadID.x].uv = v.uv;