I am trying to animate a shader parameter with animation keyframes.
Unfortunately I could not find any examples how to do this.
So far I am getting an exception
Code: Select all
OGRE EXCEPTION(9:UnimplementedException): in at d:\developer\ogre\1.9.0_x64\ogre\ogremain\include\OgreAnimable.h (line 153)
Code: Select all
class ShaderValue : public Ogre::AnimableValue
{
protected:
Ogre::GpuProgramParametersSharedPtr m_Params;
Ogre::Real m_Value;
public:
ShaderValue(Ogre::GpuProgramParametersSharedPtr p);
void setValue(Ogre::Real& val);
void applyDeltaValue(Ogre::Real& val);
void setCurrentStateAsBaseValue(void);
};
Code: Select all
Ogre::NumericAnimationTrack* numericTrack = animation->createNumericTrack(animation->getNumNumericTracks(), Ogre::AnimableValuePtr(myShaderValue));
If there are any source examples doing something similar (except OgreLight.h) I would be grateful for any hints.