27 #ifndef _ShaderFFPLighting_
28 #define _ShaderFFPLighting_
31 #ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
65 virtual const String& getType()
const;
70 virtual int getExecutionOrder()
const;
75 virtual void updateGpuProgramsParams(Renderable* rend, Pass* pass,
const AutoParamDataSource* source,
const LightList* pLightList);
80 virtual void copyFrom(
const SubRenderState& rhs);
85 virtual bool preAddToRenderState(
const RenderState* renderState, Pass* srcPass, Pass* dstPass);
112 typedef vector<LightParams>::type LightParamsList;
113 typedef LightParamsList::iterator LightParamsIterator;
114 typedef LightParamsList::const_iterator LightParamsConstIterator;
134 void setLightCount(
const int lightCount[3]);
140 void getLightCount(
int lightCount[3])
const;
147 void setSpecularEnable(
bool enable) { mSpecularEnable = enable; }
152 bool getSpecularEnable()
const {
return mSpecularEnable; }
157 virtual bool resolveParameters(ProgramSet* programSet);
162 virtual bool resolveDependencies(ProgramSet* programSet);
167 virtual bool addFunctionInvocations(ProgramSet* programSet);
173 bool addGlobalIlluminationInvocation(Function* vsMain,
const int groupOrder,
int& internalCounter);
178 bool addIlluminationInvocation(LightParams* curLightParams, Function* vsMain,
const int groupOrder,
int& internalCounter);
186 bool mSpecularEnable;
188 LightParamsList mLightParamsList;
220 static Light msBlankLight;
229 class _OgreRTSSExport FFPLightingFactory :
public SubRenderStateFactory
236 virtual const String& getType()
const;
241 virtual SubRenderState* createInstance(ScriptCompiler* compiler, PropertyAbstractNode* prop, Pass* pass, SGScriptTranslator* translator);
246 virtual void writeInstance(MaterialSerializer* ser, SubRenderState* subRenderState, Pass* srcPass, Pass* dstPass);
254 virtual SubRenderState* createInstanceImpl();
HashedVector< Light * > LightList
LightTypes
Defines the type of light.
SharedPtr< Parameter > ParameterPtr
SharedPtr< UniformParameter > UniformParameterPtr
int TrackVertexColourType
An enumeration describing which material properties should track the vertex colours.