greetings Jan_ :) im far from an expert but check out the Shaders demo if you havent already. i believe you need to extend the T_irrIShaderConstantSetCallback type and implement the OnSetConstants() method. i think the command to set the variables you are looking for is setVertexShaderConstant(). in gg.IrrBMAX this translates into setVertexShaderConstantFromName() and setVertexShaderConstant() and they reside in T_irrIMaterialRendererServices. here is the section from the Irrlicht manual under IMaterialRendererServices.setVertexShaderConstant() (this is C++ code):
Sets a constant for the vertex shader based on a name. This can be used if you used a high level shader language like CG or HLSL to create a shader. Example: If you created a shader which has variables named 'mWorldViewProj' (containing the WorldViewProjection matrix) and another one named 'fTime' containing one float, you can set them in your IShaderConstantSetCallBack derived class like this:
virtual void OnSetConstants(video::IMaterialRendererServices* services)
{
video::IVideoDriver* driver = services->getVideoDriver();
float time = (float)os::Timer::getTime()/100000.0f;
services->setVertexShaderConstant("fTime", &time, 1);
core::matrix4 worldViewProj;
worldViewProj = driver->getTransform(video::ETS_PROJECTION);
worldViewProj *= driver->getTransform(video::ETS_VIEW);
worldViewProj *= driver->getTransform(video::ETS_WORLD);
services->setVertexShaderConstant("mWorldViewProj", worldViewProj.M, 16);
}
Parameters:
name,: Name of the variable
floats,: Pointer to array of floats
count,: Amount of floats in array.
Returns:
: Returns true if successful.
hope i gave a direction to persue. the Shaders sample (available for download from my worklog) shows a gg.IrrBMAX implementation including the extended type and use of the setVertexShaderConstantFromName() method.