Advertisement
Guest User

Untitled

a guest
Sep 27th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.42 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2.  
  3. StreamFormat("standardStream",
  4. {
  5.     [VertexStream(0)] =
  6.     {
  7.         { Float, 3, Position },
  8.     },
  9.     [VertexStream(1)] =
  10.     {
  11.         { Float, 3, Normal },
  12.         { Float, 3, Tangent },
  13.         { Float, 2, TexCoord, 0 },
  14.        -- { Float, 4, Color },
  15.        -- { Float, 2, TexCoord, 1, "Projection1" },
  16.     },
  17. })
  18.  
  19. VertexFormat("standardVertex",
  20. {
  21.     { "position", float3, Position },
  22. --  { "color",    float4, Color },
  23.     { "texcoord", float2, TexCoord, 0 },
  24.     { "normal",   float3, Normal },
  25.     { "tangent",  float3, Tangent },
  26. })
  27.  
  28. ---------------------------------------------------------------------------
  29.  
  30. StreamFormat("basicPostStream",
  31. {
  32.     [VertexStream(0)] =
  33.     {
  34.         { Float, 2, Position },
  35.         { Float, 2, TexCoord },
  36.     },
  37. })
  38. VertexFormat("basicPostVertex",
  39. {
  40.     { "position", float2, Position },
  41.     { "texcoord", float2, TexCoord },
  42. })
  43. InputLayout( "basicPostStream", "basicPostVertex" )
  44.  
  45. ---------------------------------------------------------------------------
  46.  
  47. StreamFormat("simpleStream",
  48. {
  49.     [VertexStream(0)] =
  50.     {
  51.         { Float, 3, Position },
  52.     },
  53.     [VertexStream(1)] =
  54.     {
  55.         { Float, 3, Normal,   0 },
  56.         { Float, 2, TexCoord, 0 },
  57.     },
  58. })
  59.  
  60. VertexFormat("simple",
  61. {
  62.     { "position", float3, Position },
  63.     { "texcoord", float2, TexCoord, 0 },
  64.     { "normal",   float3, Normal },
  65. })
  66.  
  67. ---------------------------------------------------------------------------
  68.  
  69. StreamFormat("rocket",
  70. {
  71.     [VertexStream(0)] =
  72.     {
  73.         { Float,     2, Position },
  74.         { ByteUNorm, 4, Color },
  75.         { Float,     2, TexCoord },
  76.     },
  77. })
  78.  
  79. VertexFormat("rocket",
  80. {
  81.     { "position", float2, Position },
  82.     { "color",    float4, Color },
  83.     { "texcoord", float2, TexCoord },
  84. })
  85. ---------------------------------------------------------------------------
  86.  
  87. StreamFormat("trails",
  88. {
  89.     [VertexStream(0)] =
  90.     {
  91.         { Float, 3, Position },
  92.         { Float, 4, TexCoord },
  93.     },
  94. })
  95.  
  96. VertexFormat("trails",
  97. {
  98.     { "position", float3, Position },
  99.     { "texcoord", float4, TexCoord },
  100. })
  101. ---------------------------------------------------------------------------
  102.  
  103. InputLayout( "simpleStream", "simple" )
  104. InputLayout( "standardStream", "standardVertex" )
  105. InputLayout( "standardStream", "simple" )
  106. InputLayout( "rocket", "rocket" )
  107. InputLayout( "trails", "trails" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement