// // File : Maya_phong_connecters.cgh // #if defined (LAYER_TWO) || defined(PASS_TEX1_ALPHA_UV) #define PASS_TEX1_UV #endif // Common vertex to fragment shader structure for Maya_phong_vertex and Maya_phong_fragment // struct MAYA_phong_vert2frag { float4 hPosition : POSITION; float4 wPosition : TEXCOORD0; #if defined(BUMP_MAP) float3 wNormal : TEXCOORD1; float4 wTangent : TEXCOORD3; float4 bumpTexUv : TEXCOORD4; #elif defined (OBJECT_NORMAL) float4 bumpTexUv : TEXCOORD3; #else float3 wNormal : TEXCOORD1; #endif // BUMP_MAP #if defined(CONSTANT_COLOR) #else float4 colorTexUv : TEXCOORD2; #if defined(PASS_TEX1_UV) // Note: superscedes diffuse texture // // Packed in uv for color texture in first 2 channels, and uv for // alpha texture in the second 2 channels. float4 pass2TexUv : TEXCOORD7; #endif #endif #if defined(CONSTANT_SPECULAR) #else float4 specTexUv : TEXCOORD5; #endif float4 transpTexUv : TEXCOORD6; #if defined(CONSTANT_DIFFUSE) #else float4 diffuseTexUv : TEXCOORD7; #endif #if defined(COLOR_PER_VERTEX) // Optional color per vertex float4 colorPerVertex : COLOR0; #endif // COLOR_PER_VERTEX #if defined(COLOR_PER_VERTEX_SPECULAR) // Optional color per vertex float4 colorPerVertex : COLOR0; #endif // COLOR_PER_VERTEX_SPECULAR #if defined(COLOR_PER_VERTEX_MASK) // Optional color per vertex mask, mapped to // user attribute 0 float colorPerVertexMask; #endif #if defined(TWO_SIDED_LIGHTING) float4 frontColor : COLOR1; // Secondary front color float4 backColor : BCOL1; // Seondary back color #endif };