Can someone tell me how the RTSS works with a material that has multiple techniques? I'm trying to convert the terrain system to use RTSS so it will work with the lighting system I have in place, but I don't know how to deal with the material having multiple techniques for high and low LOD. This has to all be done in code btw, so that makes it a bit more tricky I think.
As far as I can tell you can only add a SRS (sub-render state) to the material directly and not to a specific technique. So how does the RTSS know which one to use? If you defined the material in script in would look something like this:
Code: Select all
material TestMaterial
{
lod_values 3000
// First technique for high LOD.
technique
{
pass
{
// Texture units and stuff here.
rtshader_system
{
// Parameters to RTSS.
}
}
}
// Second technique for low LOD.
technique
{
lod_index 1
pass
{
// Texture units and stuff here.
rtshader_system
{
// Parameters to RTSS.
}
}
}
}
I've noticed that createShaderBasedTechnique() has parameters for specifying a source and destination technique scheme name, which so far I've only ever been passing Ogre::MaterialManager::DEFAULT_SCHEME_NAME. Can this somehow specify which technique the RTSS is creating the information for? I'm not really sure how to use those parameters and the documentation is not very helpful either.