27 #ifndef _ShaderFFPTextureStage_
28 #define _ShaderFFPTextureStage_
31 #ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
66 virtual const String& getType()
const;
71 virtual int getExecutionOrder()
const;
76 virtual void updateGpuProgramsParams(Renderable* rend, Pass* pass,
const AutoParamDataSource* source,
const LightList* pLightList);
81 virtual void copyFrom(
const SubRenderState& rhs);
86 virtual bool preAddToRenderState(
const RenderState* renderState, Pass* srcPass, Pass* dstPass);
97 TextureUnitState* mTextureUnitState;
99 const Frustum* mTextureProjector;
101 unsigned short mTextureSamplerIndex;
124 typedef vector<TextureUnitParams>::type TextureUnitParamsList;
125 typedef TextureUnitParamsList::iterator TextureUnitParamsIterator;
126 typedef TextureUnitParamsList::const_iterator TextureUnitParamsConstIterator;
135 void setTextureUnitCount(
size_t count);
140 size_t getTextureUnitCount()
const {
return mTextureUnitParamsList.size(); }
147 void setTextureUnit(
unsigned short index, TextureUnitState* textureUnitState);
152 virtual bool resolveParameters(ProgramSet* programSet);
157 bool resolveUniformParams(TextureUnitParams* textureUnitParams, ProgramSet* programSet);
162 bool resolveFunctionsParams(TextureUnitParams* textureUnitParams, ProgramSet* programSet);
167 virtual bool resolveDependencies(ProgramSet* programSet);
172 virtual bool addFunctionInvocations(ProgramSet* programSet);
178 bool addVSFunctionInvocations(TextureUnitParams* textureUnitParams, Function* vsMain);
183 bool addPSFunctionInvocations(TextureUnitParams* textureUnitParams, Function* psMain,
int& internalCounter);
188 virtual void addPSSampleTexelInvocation(TextureUnitParams* textureUnitParams, Function* psMain,
189 const ParameterPtr& texel,
int groupOrder,
int& internalCounter);
193 bool isAlphaArgument,
const int groupOrder,
int& internalCounter);
196 ParameterPtr texel,
int samplerIndex,
const LayerBlendModeEx& blendMode,
197 const int groupOrder,
int& internalCounter,
int targetChannels);
207 bool needsTextureMatrix(TextureUnitState* textureUnitState);
212 virtual bool isProcessingNeeded(TextureUnitState* texUnitState);
218 TextureUnitParamsList mTextureUnitParamsList;
242 class _OgreRTSSExport FFPTexturingFactory :
public SubRenderStateFactory
249 virtual const String& getType()
const;
254 virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
259 virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
267 virtual SubRenderState* createInstanceImpl();
float Real
Software floating point type.
HashedVector< Light * > LightList
TexCoordCalcMethod
Enum describing the ways to generate texture coordinates.
SharedPtr< Parameter > ParameterPtr
GpuConstantType
Enumeration of the types of constant we may encounter in programs.
LayerBlendSource
List of valid sources of values for blending operations used in TextureUnitState::setColourOperation ...
SharedPtr< UniformParameter > UniformParameterPtr