Providing vertex data to vertex programs


网址:Providing vertex data to vertex Providing-vertex-data-to-vertex-programs.md

Providing vertex data to vertex programs

  • appdata_base: position, normal and one texture coordinate.
  • appdata_tan: position, tangent, normal and one texture coordinate.
  • appdata_full: position, tangent, normal, four texture coordinates and color.

  • POSITION is the vertex position, typically a float3 or float4.

  • NORMAL is the vertex normal, typically a float3.
  • TEXCOORD0 is the first UV coordinate, typically float2, float3 or float4.
  • TEXCOORD1, TEXCOORD2 and TEXCOORD3 are the 2nd, 3rd and 4th UV coordinates, respectively.
  • TANGENT is the tangent vector (used for normal mapping), typically a float4.
  • COLOR is the per-vertex color, typically a float4.

坚持原创技术分享,您的支持将鼓励我继续创作!
0%