Factorized Push Data
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user