Vertex Texture Fetch

From Tech Artists Wiki

Jump to: navigation, search

Vertex Texture Fetch, abbreviated VTF, is a technique introduced in shader model 3.0 that allows texture lookups in the vertex shader. This is especially useful for displacement mapping and fluid simulation (done realtime and rendered to a texture that is used in the vertex shader), though realtime tessellation is not possible in SM 3.0.

Vertex textures must be in the 32.32.32.32f DDS format. To use VTF in the vertex shader, the code is:

float4 theVertTex = tex2Dlod(texSampler,texCoords);

Other considerations, such as mipmapping and filtering, are covered in the See Also section.

[edit] See Also

  • Using VTF, a paper from nVidia. One of the primary sources of VTF info.
  • Gamasutra article from GPU Gems 2 about using VTF (from the same game as previous link).
Personal tools