I have more experience with XNA, not directX, but the principle is the same.
You need a normal map, this tells your shader exactly that the normal surface is at a given point. Then you need your squares to appear in the form of textures (they probably already exist, so this is actually not an extra work). Then you draw ATVs with a pixel shader, inside the shader you do something like:
float3 LightDirection;
Texture NormalMap;
sampler normalSampler = sampler_state
{
texture = <NormalMap>;
}
Texture DiffuseMap;
sampler diffuseSampler = sampler_state
{
texture = <DiffuseMap>;
}
float4 PixelShader(float2 texCoord : TEXCOORD0) : COLOR0
{
float3 Normal = tex2D(normalSampler, texCoord);
float dot = dot(LightDirection, Normal);
return tex2D(normalSampler, texCoord) * dot;
}
source
share