I am an artist and don't know anything about shaders.

Please help me.
Why don't these shaders work with the current version of gamestudio A6?
Can somebody fix them for me?
Code:
var d3d_automaterial=1;
bmap b_luminosity1=<luminosity1.tga>;
material checker1 // material name = level surface texture name
{
skin1=b_luminosity1;
effect=
"
texture mtlSkin1;
texture entSkin1;
technique luminosity_mapping
{
pass p0
{
texture[2]=<entSkin1>;
texture[3]=<mtlSkin1>;
colorarg1[0]=texture; // shadow map
colorarg2[0]=diffuse; // vertex lighting
colorop[0]=add; // add vertex lighting to shadow map
colorarg1[1]=texture; // color map
colorarg2[1]=current; // (shadow map + vertex lighting)
colorop[1]=modulate2x; // modulate color map with (shadow map + vertex lighting)
resultarg[1]=temp; // output to temp register
colorarg1[2]=texture; // color map
colorop[2]=selectarg1;
magfilter[2]=linear;
minfilter[2]=linear;
mipfilter[2]=linear;
texcoordindex[2]=1;
colorarg1[3]=current; // unshaded color map
colorarg2[3]=temp; // shaded color map
colorarg0[3]=texture; // luminosity map
colorop[3]=lerp; // interpolate between shaded color map and unshaded color map depending on luminosity map
magfilter[3]=linear;
minfilter[3]=linear;
mipfilter[3]=linear;
texcoordindex[3]=1;
}
}
";
}
if you want to apply the effect to several different level textures you could do it this way:
bmap b_luminosity2=<luminosity2.tga>;
material groundtexture2
{
skin1=b_luminosity2;
}
bmap b_luminosity3=<luminosity3.tga>;
material metaltexture_tga
{
skin1=b_luminosity3;
}
...
starter copy_effects()
{
wait(1);
groundtexture2.effect=checker1.effect;
metaltexture.effect=checker1.effect;
...
}
Code:
var d3d_automaterial=1;
bmap b_detail1=<detail1.tga>;
function init_detail_mapping
{
bmap_to_mipmap(mtl.skin1);
}
material checker1 // material name = level surface texture name
{
event=init_detail_mapping;
skin1=b_detail1;
effect=
"
texture mtlSkin1;
technique detail_mapping
{
pass p0
{
texture[2]=<mtlSkin1>;
colorarg1[0]=texture; // shadow map
colorarg2[0]=diffuse; // vertex lighting
colorop[0]=add; // add vertex lighting to shadow map
resultarg[0]=temp; // output to temp register
colorarg1[1]=texture; // color map
colorop[1]=selectarg1;
colorarg1[2]=texture; // detail map
colorarg2[2]=current; // color map
colorop[2]=addsigned; // add detail map to color map
texcoordindex[2]=1;
texturetransformflags[2]=count2;
texturetransform[2]={8.0,0.0,0.0,0.0, // detail map u scale
0.0,8.0,0.0,0.0, // detail map v scale
0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0};
magfilter[2]=linear;
minfilter[2]=linear;
mipfilter[2]=linear;
colorarg1[3]=temp; // (shadow map + vertex lighting)
colorarg2[3]=current; // (color map + detail map)
colorop[3]=modulate2x; // modulate (color map + detail map) with (shadow map + vertex lighting)
magfilter[3]=linear;
minfilter[3]=linear;
mipfilter[3]=linear;
}
}
";
}