Screen of first try at per-pixel diffuse
This is my first running version of per-pixel diffuse lighting with texture blending.
The texture ops are:
As you can see I'm just currently doing additive texture blending, but it looks great. The per-pixel lighting is sooooo much better than per-vertex.
float4 PS(float3 Light : TEXCOORD0,float3 Norm : TEXCOORD1,
float2 TerrainUV : TEXCOORD2,float2 DetailUV : TEXCOORD3) : COLOR
//vDic=intensity * color
return A*MixColor+vDic * saturate(dot(Light,Norm));
Now that I've got it working and understand a lot more about pixel and vertex shaders, look out for some razzle dazzle effects.