I'm trying to get shadow parameters to my shaders by passing them through the setCustomParameter function of Light.
It's working great for all the lights except the last one, but I can't figure out why.
I'm setting the custom indices like this:
Code: Select all
fragParams->setNamedAutoConstant("shadowParams", Ogre::GpuProgramParameters::ACT_LIGHT_CUSTOM, lightIndex, shadowParamsIndex);
Code: Select all
light->setCustomParameter(shadowParamsIndex, Ogre::Vector4(param0, param1, 0.0, 0.0));
What am I missing?
EDIT: I should probably mention each light contribution is computed in its own pass.