Code: Select all
params->setNamedConstant( "shadowViewProj", mat );What I didnt realize was - just declaring a param in your shader isnt enough, you have to actually USE it (or it will get removed automatically by the compiler).OGRE EXCEPTION(2:InvalidParametersException): Parameter called shadowViewProj does not exist. in GpuProgramParameters::_findNamedConstantDefinition at c:\sdks\ogrecvs\ogrenew\ogremain\src\ogregpuprogram.cpp (line 883)
My complaint is - if I want to tweak/test a shader (comment/uncomment lines of code), I have to comment out the 'params->setNamedConstant' line, and recompile! I cant just turn shadowing on/off with a simple comment, becuase that causes the param declaration to vanish!
My suggestion - Wouldnt it be better to NOT crash your application when a shader param cant be found? Isnt a warning in the ogre log good enough?
