The difference is best visualised by an example. So lets take a look at a rather simple snippet from FFPTransform before
Code: Select all
FunctionInvocation* transformFunc = OGRE_NEW FunctionInvocation(FFP_FUNC_TRANSFORM, FFP_VS_TRANSFORM);
transformFunc->pushOperand(wvpMatrix, Operand::OPS_IN);
transformFunc->pushOperand(positionIn, Operand::OPS_IN);
transformFunc->pushOperand(positionOut, Operand::OPS_OUT);
vsEntry->addAtomInstance(transformFunc);
UniformParameterPtr pointParams = vsProgram->resolveAutoParameterReal(GpuProgramParameters::ACT_POINT_PARAMS, 0);
ParameterPtr pointSize = vsEntry->resolveOutputParameter(
Parameter::SPS_TEXTURE_COORDINATES, -1, Parameter::SPC_POINTSPRITE_SIZE, GCT_FLOAT1);
transformFunc = OGRE_NEW FunctionInvocation("FFP_DerivePointSize", FFP_VS_TRANSFORM);
transformFunc->pushOperand(pointParams, Operand::OPS_IN);
transformFunc->pushOperand(positionOut, Operand::OPS_IN, Operand::OPM_W);
transformFunc->pushOperand(pointSize, Operand::OPS_OUT);
vsEntry->addAtomInstance(transformFunc);
Code: Select all
auto stage = vsEntry->getStage(FFP_VS_TRANSFORM);
stage.callFunction(FFP_FUNC_TRANSFORM, wvpMatrix, positionIn, positionOut);
UniformParameterPtr pointParams = vsProgram->resolveParameter(GpuProgramParameters::ACT_POINT_PARAMS);
ParameterPtr pointSize = vsEntry->resolveOutputParameter(Parameter::SPC_POINTSPRITE_SIZE);
stage.callFunction("FFP_DerivePointSize", pointParams, In(positionOut).w(), pointSize);
https://codedocs.xyz/OGRECave/ogre/rtss ... extensions