OKay I finish the shader script! finaly..
This shader use a environemnt cube, as skin1 mtl
and the rest is a terrain.. is just works well for plane surfaces...

Can be use for ice ground..or wet envirnoment (alpha selection)




/////
//// A6 Shader , Developed By Unknot
/// For ice floor, or Wet paviments
/// Use a terrain with skin1 base map with alpha map
bmap bmp_envplane = <skycube5+6.tga>; //cube image


function mtl_envplane()
{
mat_set(mtl.matrix,matViewInv);
mtl.matrix41=0;
mtl.matrix42=0;
mtl.matrix43=0;
}

function mtl_envplane_ini()
{
//...maybe you should copy the mat_model properties here...
bmap_to_cubemap(mtl.skin1);
mtl.event=mtl_envplane;
mtl.enable_view=on;
}
material mtl_envcube2plane // environment cube
{
skin1 = bmp_envplane; //cube plane
event = mtl_envplane_ini;

effect=
"
texture mtlSkin1;
texture entSkin1;
matrix matMtl;
technique cubic_environment
{
pass p0
{

Texture[1]=<mtlSkin1>;











zWriteEnable=true;
alphaBlendEnable=false;



//colorArg1[1]=diffuse;
//colorArg1[1]=texture;


colorOp[1]=blendCurrentAlpha;
addressU[1]=Clamp;
addressV[1]=Clamp;





TextureTransformFlags[1] =count3 ;
texcoordindex[1]= cameraspaceposition ; // For cubemap use: cameraspacereflectionvector
//texcoordindex[1]= cameraspacereflectionvector | 1; // For cubemap use: cameraspacereflectionvector

TextureTransform[1]=<matMtl>;


}
}
";

}


action shaders_plane
{
my.material = mtl_envcube2plane;
}