11 lines
362 B
HLSL
11 lines
362 B
HLSL
#include "RootConstants.hlsl"
|
|
|
|
float4 main(float4 Color : TEXCOORD0, float3 WorldNormal : TEXCOORD1) : SV_Target0
|
|
{
|
|
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);
|
|
}
|