Add builtin unlit surface path

This commit is contained in:
2026-04-03 17:18:46 +08:00
parent 1ac2afb0bb
commit 308b3b061c
14 changed files with 466 additions and 14 deletions

View File

@@ -0,0 +1,25 @@
// XC_BUILTIN_UNLIT_D3D12_PS
Texture2D gBaseColorTexture : register(t1);
SamplerState gLinearSampler : register(s1);
cbuffer PerObjectConstants : register(b1) {
float4x4 gProjectionMatrix;
float4x4 gViewMatrix;
float4x4 gModelMatrix;
float4x4 gNormalMatrix;
float4 gMainLightDirectionAndIntensity;
float4 gMainLightColorAndFlags;
};
cbuffer MaterialConstants : register(b2) {
float4 gBaseColorFactor;
};
struct PSInput {
float4 position : SV_POSITION;
float2 texcoord : TEXCOORD0;
};
float4 MainPS(PSInput input) : SV_TARGET {
return gBaseColorTexture.Sample(gLinearSampler, input.texcoord) * gBaseColorFactor;
}