Not sure, maybe try this:

material EnvMaterial
{
event = the_material_function;
effect = "theeffect.fx";
gflags = ENABLE_VIEW;
}

I think if you want it to update every frame, you must add the flag ENABLE_VIEW..

Hope it helps, ^^
Adoado


Visit our development blog: http://yellloh.com