23 lines
536 B
HLSL
23 lines
536 B
HLSL
// 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;
|
|
}
|