About Me Demo Videos Demo Music Research
 

XNA Terrain Shader (2009)
 
 

<
 


Created By:

Thomas Oskam


Details:

- C# / XNA (DirectX)

- windows forms

- hardware instancing
  for minimal
  memory upload


 

This terrain shader is a little project I made while I was working on an XNA engine. The terrain is drawn as a heightfield that is completely build together within the vertex shader. A 16x16 triangle grid is send to the GPU and, using hardware instancing, it is duplicaded and transformed to create the terrain. Using a color channel texture, 4 different textures can be smoothly blended over the surface.
Download the XNA shader code example here.

 
 
About Me Demo Videos Demo Music Research