i am still troubled with the thing, i have the 6.50.2 version now.
Code:
bmap cubem = <cube1small+6.tga>;
bmap metDOT = <metal49DOT3.tga>;
function mtl_envmap_view()
{
mat_set(mtl.matrix,matViewInv);
mtl.matrix41=0;
mtl.matrix42=0;
mtl.matrix43=0;
}
function mtl_envmap_init()
{
bmap_to_cubemap(mtl.skin4);
mtl.event=mtl_envmap_view;
mtl.enable_view=on;
}
material spec_mat{
effect="SpecSun.fx";
flags=tangent;
}
material nullmat{
power=2;
skin1=metDOT;
skin4=cubem;
}
material reflect_mat{
event=mtl_envmap_init;
effect="cubemap.fx";
}
entity* grundEH;
function shader_startup();
ACTION grundeinheit{
while(!me){wait(1);}
grundEH=my;
shader_startup();
while(1){
my.pan+=0.5*time_step;
wait(1);
}
}
function shader_startup() {
while(!grundEH){wait(1);}
spec_mat.skill1=float(sun_pos.x);
spec_mat.skill2=float(sun_pos.z);
spec_mat.skill3=float(sun_pos.y);
grundEH.material=nullmat;
ent_mtlset (grundEH, spec_mat, 3);
ent_mtlset (grundEH, reflect_mat, 1);
wait(5);
}
.. does not show any shaders. though, the model parts are not invisible anymore, but get, as soon as i apply the fx file in MED directly. both shaders work if i apply em to the model alone.