- Timestamp:
- 03/01/07 18:05:03 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDepthShadowRecieverRenderTechnique.cpp
r1670 r2180 8 8 String shadowVertexProgram, 9 9 String shadowFragmentProgram, 10 String WorldViewProjParamName, 11 String WorldParamName, 10 12 bool setLightViewMatrix, 11 13 bool setLightViewProjMatrix, … … 30 32 this->lightViewParamName = lightViewParamName; 31 33 this->lightFarPlaneParamName = lightFarPlaneParamName; 34 this->WorldParamName = WorldParamName; 35 this->WorldViewProjParamName = WorldViewProjParamName; 32 36 33 37 //insert new passes … … 55 59 56 60 GpuProgramParameters* Vparams = newpass->getVertexProgramParameters().getPointer(); 57 Vparams->setNamedAutoConstant( "worldViewProj",61 Vparams->setNamedAutoConstant(WorldViewProjParamName, 58 62 GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX); 59 Vparams->setNamedAutoConstant( "world",63 Vparams->setNamedAutoConstant(WorldParamName, 60 64 GpuProgramParameters::ACT_WORLD_MATRIX); 61 65 GpuProgramParameters* Fparams = newpass->getFragmentProgramParameters().getPointer(); … … 185 189 f->lightFarPlaneParamName = vecparams[1]; 186 190 } 191 192 void parseLightProjParamName(String& params, RenderTechniqueFactory* factory) 193 { 194 OgreDepthShadowRecieverRenderTechniqueFactory* f = (OgreDepthShadowRecieverRenderTechniqueFactory*) factory; 195 f->lightViewProjParamName = params; 196 } 197 198 void parseLightViewParamName(String& params, RenderTechniqueFactory* factory) 199 { 200 OgreDepthShadowRecieverRenderTechniqueFactory* f = (OgreDepthShadowRecieverRenderTechniqueFactory*) factory; 201 f->lightViewParamName = params; 202 } 203 204 void parseWorldViewProjParamName(String& params, RenderTechniqueFactory* factory) 205 { 206 OgreDepthShadowRecieverRenderTechniqueFactory* f = (OgreDepthShadowRecieverRenderTechniqueFactory*) factory; 207 f->WorldViewProjParamName = params; 208 } 209 210 void parseWorldParamName(String& params, RenderTechniqueFactory* factory) 211 { 212 OgreDepthShadowRecieverRenderTechniqueFactory* f = (OgreDepthShadowRecieverRenderTechniqueFactory*) factory; 213 f->WorldParamName = params; 214 } 215 216 void parseLightFarPlaneParamName(String& params, RenderTechniqueFactory* factory) 217 { 218 OgreDepthShadowRecieverRenderTechniqueFactory* f = (OgreDepthShadowRecieverRenderTechniqueFactory*) factory; 219 f->lightFarPlaneParamName = params; 220 } 187 221 } 188 222 … … 199 233 this->attributeParsers.insert(AttribParserList::value_type("set_light_view", (ILLUM_ATTRIBUTE_PARSER) parseSetLightView)); 200 234 this->attributeParsers.insert(AttribParserList::value_type("set_light_farplane", (ILLUM_ATTRIBUTE_PARSER) parseSetLightFarPlane)); 235 this->attributeParsers.insert(AttribParserList::value_type("light_viewproj_param_name", (ILLUM_ATTRIBUTE_PARSER) parseLightProjParamName)); 236 this->attributeParsers.insert(AttribParserList::value_type("light_view_param_name", (ILLUM_ATTRIBUTE_PARSER) parseLightViewParamName)); 237 this->attributeParsers.insert(AttribParserList::value_type("world_view_proj_param_name", (ILLUM_ATTRIBUTE_PARSER) parseWorldViewProjParamName)); 238 this->attributeParsers.insert(AttribParserList::value_type("world_param_name", (ILLUM_ATTRIBUTE_PARSER) parseWorldParamName)); 239 this->attributeParsers.insert(AttribParserList::value_type("light_farplane_param_name", (ILLUM_ATTRIBUTE_PARSER) parseLightFarPlaneParamName)); 201 240 } 202 241 … … 209 248 //reset parameters 210 249 maxlights = 1; 211 shadowVertexProgram = "G ameTools/ShadowMap/ShadowVS";212 shadowFragmentProgram = "G ameTools/ShadowMap/ShadowPS";250 shadowVertexProgram = "GTP/Basic/LightCPos_VS"; 251 shadowFragmentProgram = "GTP/Basic/SM/Dist_PS"; 213 252 setLightViewMatrix = false; 214 253 setLightViewProjMatrix = true; 215 254 setLightProjFarPlane = false; 216 lightViewProjParamName = " lightViewProj";217 lightViewParamName = " lightView";255 lightViewProjParamName = "LightViewProj"; 256 lightViewParamName = "LightView"; 218 257 lightFarPlaneParamName = "lightFarPlane"; 258 WorldViewProjParamName = "WorldViewProj"; 259 WorldParamName = "World"; 219 260 220 261 parseParams(params); … … 224 265 shadowVertexProgram, 225 266 shadowFragmentProgram, 267 WorldViewProjParamName, 268 WorldParamName, 226 269 setLightViewMatrix , 227 270 setLightViewProjMatrix,
Note: See TracChangeset
for help on using the changeset viewer.