Professional Documents
Culture Documents
Vertex Factory Layout
Vertex Factory Layout
TEXCOORD6 - TEXCOORD9.
It is responsible for things such as :
- Static lighting colors and coordinates
- WorldPosition, ScreenPosition
PassVertexShader
{
FVertexFactoryIntermediates VFIntermediates = GetVertexFactoryIntermedia
tes(Input);
FMaterialVertexParameters VertexParameters = GetMaterialVertexParameters(Inp
ut, VFIntermediates);
FactoryInterpolants = VertexFactoryGetInterpolants( Input, VFIntermediat
es, VertexParameters);
float4 WorldPosition = VertexParameters.TranslatedWorldPosition;
ISOLATE
{
WorldPosition.xyz += GetMaterialWorldPositionOffset(VertexParameters
);
}
Position = MulMatrix(ViewProjectionMatrix,WorldPosition);
// ...
}
//******************************************************************************
*****************************
//*********************************************** CONSTANTS & UTILITIES ********
*****************************
//******************************************************************************
*****************************
//******************************************************************************
*****************************
//*********************************************** VERTEX SHADER INPUTS *********
*****************************
//******************************************************************************
*****************************
struct FVertexFactoryInput;
//******************************************************************************
*****************************
//*********************************************** VERTEX SHADER INTERMEDIATES **
*****************************
//******************************************************************************
*****************************
struct FVertexFactoryIntermediates;
FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In
put);
//******************************************************************************
*****************************
//*********************************************** VERTEX SHADER PARAMETERS *****
*****************************
//******************************************************************************
*****************************