/* * The following macro invocations define the ITF handled shader parameters. * Include this file after having defined what's behind ITF_DECLARE_PS_ATTRIB_REG * * The macro have the form : * * ITF_DECLARE_VS_ATTRIB_REG(attribType, attribName, attribFirstReg) * * attribType : The type as declared in the shader (float4, float3x4, etc.) * attribName : The name of the attribute in the shaders. * attribFirstReg : The first register the attribute is mapped on. * * ITF_DECLARE_VS_ATTRIB_ARRAY_REG(attribType, attribName, arraySize, attribFirstReg) * attribType : The type as declared in the shader * attribName : The name of the attribute in the shaders. * arraySize : Size of the array (what's in [] in a declaration) * attribFirstReg : The first register the attribute is mapped on. * * ITF_DECLARE_VS_ATTRIB_STRUCT_REG(structType, attribName, structSize, attribFirstReg) * structType : The type as declared in the shader (be sure to declare your struct first) * attribName : The name of the attribute in the shaders. * structSize : Size of the array (what's in [] in a declaration) * attribFirstReg : The first register the attribute is mapped on. * */ //Global BEGIN_CONSTANT_BUFFER(Global_VS, 0, 0) ITF_DECLARE_VS_ATTRIB_REG(MATRIX_ORDERING float4x4, mWorldViewProjection, 0) // World * View * Projection matrix ITF_DECLARE_VS_ATTRIB_REG(MATRIX_ORDERING float4x4, mUVmat, 4) ITF_DECLARE_VS_ATTRIB_REG(MATRIX_ORDERING float4x4, mWorld, 8) // World matrix ITF_DECLARE_VS_ATTRIB_REG(MATRIX_ORDERING float4x4, mUVmat2, 12) // UV mat 2 ITF_DECLARE_VS_ATTRIB_REG(float4, globalColor, 16) ITF_DECLARE_VS_ATTRIB_REG(float4, zInject, 17) //x: zInject END_CONSTANT_BUFFER //ViewForAfterFx #if defined( CB_AFTERFX ) BEGIN_CONSTANT_BUFFER(AfterFx_VS, 1, 1) ITF_DECLARE_VS_ATTRIB_REG(MATRIX_ORDERING float4x4, mViewForAfterFx, 4) // exclusif with mUVmat ITF_DECLARE_VS_ATTRIB_REG(float4, afxBlur, 19) // blur offset END_CONSTANT_BUFFER #endif // defined( CB_AFTERFX ) //MultiTexture #if defined( CB_MULTITEXTURE ) BEGIN_CONSTANT_BUFFER(MultiTexture_VS, 2, 2) ITF_DECLARE_VS_ATTRIB_ARRAY_REG(MATRIX_ORDERING float4x4, multiTexTransformUV, 4, 19) ITF_DECLARE_VS_ATTRIB_REG(float4, MultiTexSinusParam, 35) //x: elapsed Time, y:speed ITF_DECLARE_VS_ATTRIB_REG(float4, MultiTexSinusAmplitude, 36) END_CONSTANT_BUFFER #endif // defined( CB_MULTITEXTURE ) #if defined( CB_RENDERPCT ) BEGIN_CONSTANT_BUFFER(RenderPCT_VS, 3, 3) ITF_DECLARE_VS_ATTRIB_REG(float4, SpriteInstancing, 18) //x: Quad size ITF_DECLARE_VS_ATTRIB_STRUCT_REG(VS_DynFogParam, fog1Param, 3, 238) // 3 -> sizeof(VS_DynFogParam) (in reg count) ITF_DECLARE_VS_ATTRIB_STRUCT_REG(VS_DynFogParam, fog2Param, 3, 241) ITF_DECLARE_VS_ATTRIB_REG(float4, patchZ, 19) //x: Z ITF_DECLARE_VS_ATTRIB_REG(float4, patchParam, 20) //x: vDiv, y:useRotate, z:bezierPatchOffset ITF_DECLARE_VS_ATTRIB_REG(float4, trailAlpha, 19) // x:alphaBegin, y:alphaEnd ITF_DECLARE_VS_ATTRIB_REG(float4, trailParam, 20) // x:fvid, y:fCount, z:fadeLength ITF_DECLARE_VS_ATTRIB_REG(float4, fluidVDiv, 19) // x:vDiv ITF_DECLARE_VS_ATTRIB_REG(float4, fluidParam, 20) // x: idx, y:step, z:delta1, w:delta2 ITF_DECLARE_VS_ATTRIB_REG(float4, fluidUV1, 21) // uv-0-1 ITF_DECLARE_VS_ATTRIB_REG(float4, fluidUV2, 22) // uv-2-3 ITF_DECLARE_VS_ATTRIB_REG(float4, splineParam, 19) //x:bufferPoint, y:height ITF_DECLARE_VS_ATTRIB_REG(float4, frizeAnim, 19) //xyzw END_CONSTANT_BUFFER // Skinning (RenderPCT) BEGIN_CONSTANT_BUFFER(Skinning_RenderPCT_VS, 4, 4) ITF_DECLARE_VS_ATTRIB_ARRAY_REG(BoneMatrix, mBoneMatrix00, 70, 25) // 70*3 register 25 to 235 END_CONSTANT_BUFFER // Bezier patch(RenderPCT) BEGIN_CONSTANT_BUFFER(Bezier_RenderPCT_VS, 5, 5) ITF_DECLARE_VS_ATTRIB_ARRAY_REG(float4, va0, 8*16, 25) ITF_DECLARE_VS_ATTRIB_ARRAY_REG(float4, va1, 4*16, 153) END_CONSTANT_BUFFER #endif // defined( CB_RENDERPCT ) #if defined( CB_AUTODANCE ) // Autodance VS constants BEGIN_CONSTANT_BUFFER(AutoDance_VS, 6, 5) ITF_DECLARE_VS_ATTRIB_REG(float4, reg0, 32) ITF_DECLARE_VS_ATTRIB_REG(float4, reg1, 33) ITF_DECLARE_VS_ATTRIB_REG(float4, reg2, 34) ITF_DECLARE_VS_ATTRIB_REG(float4, reg3, 35) ITF_DECLARE_VS_ATTRIB_REG(float4, reg4, 36) ITF_DECLARE_VS_ATTRIB_REG(float4, reg5, 37) ITF_DECLARE_VS_ATTRIB_REG(float4, reg6, 38) END_CONSTANT_BUFFER #endif