
CHAPTER 5 ■ GETTING THE MOST OUT OF VERTICES
476
technique CustomVertexShader
{
pass Pass0
{
VertexShader = compile vs_1_1 CVVertexShader();
PixelShader = compile ps_2_0 CVPixelShader();
}
}
5-13. Work with Bump Mapping: Fixed Normal
The Problem
One of the main problems of a triangle is that it’s flat. If you render a large wall using two huge
triangles and cover it with a nice texture, the result will look disappointingly flat.
Youcanaddrealheightdetailtoatriangleonlybysplittingthetriangleupintosmaller
triangles, where you can define the 3D position of each vertex. This would, however, consume
toomuchoftheresourcesofyourPC. ...