I am trying to understand how OGRE works at a lower level, and from what I have read so far, I believe OGRE generates shaders from material scripts using its RTShader system, on the loading of each scene (based on the contents).
My questions are:
Is this correct? (i.e. does OGRE 1.7.1 by default generate shaders at runtime by default?)
If 'yes', do the generated shaders support hardware skeletal animation by default?
In either case, if 'yes' to (1), when I extend a material script specifying a fragment program, is this incorporated into the generated script or does it completely replace it?
OK, so I got PIX to debug a scene with a model with skeletal animation, and it turns out the fixed-function pipeline was in use (no vertex or pixel shaders were available for PIX to debug even as assembly).
I then looked with the debugger for the properties referenced in the skeletal animation example file SkeletalAnimation.h:
// change the value if hardware skinning is enabled Pass* pass = ent->getSubEntity(0)->getMaterial()->getBestTechnique()->getPass(0); if (pass->hasVertexProgram() && pass->getVertexProgram()->isSkeletalAnimationIncluded()) value = "Hardware";
And found that there was no vertex or fragment program to speak of, hence I can assume the answer to (2) at least is 'no'.
Looking further at OGRE's documentation it seems I can combine shaders with the FFP, but only replacing specific stages. (i.e. I can't use the FFP vertex processing and then add a vertex shader)
I am still unsure though about RTShader: Is it an established part of OGRE, or still in development? Do I have to turn it on? Or do I have to invoke it manually?