Add depth-only and shadow-caster pass skeletons

This commit is contained in:
2026-04-04 14:27:44 +08:00
parent c0124443cf
commit 9e8810e593
25 changed files with 1323 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
// XC_BUILTIN_SHADOW_CASTER_D3D12_VS
cbuffer PerObjectConstants : register(b0) {
float4x4 gProjectionMatrix;
float4x4 gViewMatrix;
float4x4 gModelMatrix;
};
struct VSInput {
float3 position : POSITION;
};
struct PSInput {
float4 position : SV_POSITION;
};
PSInput MainVS(VSInput input) {
PSInput output;
float4 positionWS = mul(gModelMatrix, float4(input.position, 1.0));
float4 positionVS = mul(gViewMatrix, positionWS);
output.position = mul(gProjectionMatrix, positionVS);
return output;
}