| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- //-----------------------------------------------------------------------------
- // Copyright (c) 2012 GarageGames, LLC
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to
- // deal in the Software without restriction, including without limitation the
- // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- // sell copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in
- // all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- // IN THE SOFTWARE.
- //-----------------------------------------------------------------------------
- // The purpose of this file is to get all of our HLSL structures into one place.
- // Please use the structures here instead of redefining input and output structures
- // in each shader file. If structures are added, please adhere to the naming convention.
- //------------------------------------------------------------------------------
- // Vertex Input Structures
- //
- // These structures map to FVFs/Vertex Declarations in Torque. See gfxStructs.h
- //------------------------------------------------------------------------------
- // Notes
- //
- // Position should be specified as a float4. Right now our vertex structures in
- // the engine output float3s for position. This does NOT mean that the POSITION
- // binding should be float3, because it will assign 0 to the w coordinate, which
- // results in the vertex not getting translated when it is transformed.
- struct VertexIn_P
- {
- float4 pos : POSITION;
- };
- struct VertexIn_PT
- {
- float4 pos : POSITION;
- float2 uv0 : TEXCOORD0;
- };
- struct VertexIn_PTTT
- {
- float4 pos : POSITION;
- float2 uv0 : TEXCOORD0;
- float2 uv1 : TEXCOORD1;
- float2 uv2 : TEXCOORD2;
- };
- struct VertexIn_PC
- {
- float4 pos : POSITION;
- float4 color : DIFFUSE;
- };
- struct VertexIn_PNC
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- float4 color : DIFFUSE;
- };
- struct VertexIn_PCT
- {
- float4 pos : POSITION;
- float4 color : DIFFUSE;
- float2 uv0 : TEXCOORD0;
- };
- struct VertexIn_PN
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- };
- struct VertexIn_PNT
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- float2 uv0 : TEXCOORD0;
- };
- struct VertexIn_PNTT
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- float3 tangent : TANGENT;
- float2 uv0 : TEXCOORD0;
- };
- struct VertexIn_PNCT
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- float4 color : DIFFUSE;
- float2 uv0 : TEXCOORD0;
- };
- struct VertexIn_PNTTTB
- {
- float4 pos : POSITION;
- float3 normal : NORMAL;
- float2 uv0 : TEXCOORD0;
- float2 uv1 : TEXCOORD1;
- float3 T : TEXCOORD2;
- float3 B : TEXCOORD3;
- };
|