Add depth-only and shadow-caster pass skeletons
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user