Formalize forward lighting contract

This commit is contained in:
2026-04-05 15:44:37 +08:00
parent f6da4d0eb6
commit 2c96f0d164
18 changed files with 152 additions and 90 deletions

View File

@@ -14,12 +14,13 @@ Shader "Builtin Forward Lit"
Resources
{
PerObjectConstants (ConstantBuffer, 0, 0) [Semantic(PerObject)]
MaterialConstants (ConstantBuffer, 1, 0) [Semantic(Material)]
BaseColorTexture (Texture2D, 2, 0) [Semantic(BaseColorTexture)]
LinearClampSampler (Sampler, 3, 0) [Semantic(LinearClampSampler)]
ShadowReceiverConstants (ConstantBuffer, 4, 0) [Semantic(ShadowReceiver)]
ShadowMapTexture (Texture2D, 5, 0) [Semantic(ShadowMapTexture)]
ShadowMapSampler (Sampler, 6, 0) [Semantic(ShadowMapSampler)]
LightingConstants (ConstantBuffer, 1, 0) [Semantic(Lighting)]
MaterialConstants (ConstantBuffer, 2, 0) [Semantic(Material)]
ShadowReceiverConstants (ConstantBuffer, 3, 0) [Semantic(ShadowReceiver)]
BaseColorTexture (Texture2D, 4, 0) [Semantic(BaseColorTexture)]
LinearClampSampler (Sampler, 5, 0) [Semantic(LinearClampSampler)]
ShadowMapTexture (Texture2D, 6, 0) [Semantic(ShadowMapTexture)]
ShadowMapSampler (Sampler, 7, 0) [Semantic(ShadowMapSampler)]
}
HLSLPROGRAM
#pragma vertex MainVS