HLSL kodu..
float4 TerrainPS(float2 TileTexCoord : TEXCOORD0,float4 projTex : TEXCOORD3) : COLOR
{
float4 colMap = tex2D(ColourMapSampler, TileTexCoord).rgba; //terrain ANA texturu
float4 colMap2 = tex2D(ColourMapSampler2, TileTexCoord).rgba; //2.terrain ANA texturesi
//1.nin rgba si
float3 textureColor1 = (tex2D(t0Sampler, TileTexCoord*4).rgb*colMap[0] + //red
tex2D(t1Sampler, TileTexCoord*4).rgb*colMap[1] +
tex2D(t2Sampler, TileTexCoord*4).rgb*colMap[2] +
tex2D(t3Sampler, TileTexCoord*4).rgb*colMap[3] );
//2.nin rgba si
float3 textureColor2 = (tex2D(t4Sampler,TileTexCoord*4).rgb*colMap2[0] +
tex2D(t5Sampler,TileTexCoord*4).rgb*colMap2[1] +
tex2D(t6Sampler,TileTexCoord*4).rgb*colMap2[2] +
tex2D(t7Sampler,TileTexCoord*4).rgb*colMap2[3] );//alfa 2-2
textureColor1 += textureColor2;
//fırça texturu
float CursorScale = 24;
projTex.xy /= 2;
projTex.x = -0.5f*projTex.x + 0.5f;
projTex.y = 0.5f*projTex.y + 0.5f;
float4 cursorColour = tex2D(FircaSampler,projTex);
textureColor1.rgb += cursorColour;
return float4(textureColor1, 0);
}