case ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY:
for (size_t l = 0; l < i->data; ++l)
{
_writeRawConstant(i->physicalIndex + l*i->elementCount, source->getTextureViewProjMatrix(l) );
}
break;
These constants already exist for 1.5. They are called ACT_TEXTURE_VIEWPROJ_MATRIX and ACT_TEXTURE_WORLDVIEWPROJ_MATRIX. You'll have to grab HEAD to get them or wait for Shoggoth to hit release.
I need the array versions of these constants. We have a configurable shadow-casting light setup for material/shaders where we have loops for shadows. So, using ACT_TEXTURE_VIEWPROJ_MATRIX with light indices is not very flexible. Ex:
You can use whatever parameter you want with param_named. In fact, you can perform what you need without having to change Ogre at all to do it. You'll just have to do the updating of your custom parameters yourself, is all.
Yes, I do use param_named in other cases, but in this case the array of matrices are not custom, they are updated by Ogre and available as auto constants anyway. Only presentation in array form is missing and would be nice to have (maybe for other developers too).
Define a variable just in the material scripts, or one which is also set in the shader? You can define a constant in some shader languages and Ogre can pass values into the preprocessor. If you want just variables in the material script itself, again, this is part of Shoggoth. If you get HEAD you'll need to make sure OGRE_USE_NEW_COMPILERS is set to 1 in OgreConfig.h. Then you can do something like this: