Factorized Push Data

This commit is contained in:
2026-02-22 15:54:09 -05:00
parent 1e1ec84fa1
commit a781facd48
13 changed files with 85 additions and 36 deletions

View File

@@ -1,4 +1,10 @@
float4 main(float4 Color : TEXCOORD0) : SV_Target0
#include "RootConstants.hlsl"
float4 main(float4 Color : TEXCOORD0, float3 WorldNormal : TEXCOORD1) : SV_Target0
{
return Color;
float3 N = normalize(WorldNormal);
float NdotL = saturate(dot(N, -LightDirection));
float3 diffuse = Color.rgb * LightColor * NdotL;
float3 ambient = Color.rgb * AmbientIntensity;
return float4(diffuse + ambient, Color.a);
}