Hello,

I would like to know how to add lighting with sunlight in the first code that was done.

Code:
float4x4 matWorld;
float4x4 matWorldViewProj;
float4 vecSkill41;

texture entSkin1;

sampler TexSampler = sampler_state
{
	Texture = <entSkin1>;
	MipFilter = Linear;
	AddressU = Wrap;
	Addressv = Wrap;
};

struct out_tiling
{
	float4 Pos	: POSITION;
	float2 Tex0	: TEXCOORD0;
};

out_tiling vs_20
(
	in float4 inPos 	: POSITION,
	in float2 inTex0 	: TEXCOORD0
)
{
	out_tiling Out;
	
	Out.Pos = mul(inPos,matWorldViewProj);
	Out.Tex0 = inTex0;

	return Out;
}
	
float4 ps_20 ( out_tiling In ): COLOR
{
	float2 Coord;
	Coord.x = In.Tex0.x * vecSkill41.x;
	Coord.y = In.Tex0.y * vecSkill41.y;
	
	return tex2D ( TexSampler, Coord );
}

technique TexTile
{
	pass one
	{
		VertexShader = compile vs_2_0 vs_20();
		PixelShader = compile ps_2_0 ps_20();	
	}		
}



Thanks in advance.