Factorized Push Data

This commit is contained in:
Patedam committed 2026-02-22 15:54:09 -05:00
1 parent 1e1ec84fa1
commit a781facd48
13 files changed
+85 -36

No files matched your search

+8 -2
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);
}