Shader wie in Morrowind

Posted By: zSteam_

Shader wie in Morrowind - 07/08/04 23:55

ich hab schon das Aussehen fast hinbekommen aber ich brauch noch eine Verbesserung das Wasser muss sich auf alle fälle bewegen
__________________________________________________________________
bmap waterbump = <waterbump.bmp>;
bmap envspec = <sky1.tga>; // <skycube+6.tga>;


function mtl_ffpwater_1()
{

///////////////////////////////////////////////
// Lets make it scroll in some direction
//

mtl.skill1 += time;
mtl.matrix41 = floatd(mtl.skill1,4000);


}

function mtl_ffpwater_init()
{

mtl.matrix11 = float(1.6);
mtl.matrix22 = float(0.8);

bmap_to_mipmap(mtl.skin1);
bmap_to_mipmap(mtl.skin2);

bmap_to_normals(mtl.skin1,10.5);

bmap_to_cubemap(mtl.Skin2);

mtl.event = mtl_ffpwater_1;

mtl.enable_view = on;

}


material mtl_ffpwater
{
skin1=waterbump;
skin2=envspec;

event = mtl_ffpwater_init;

effect = "

matrix matMtl;

texture mtlSkin1;
texture mtlSkin2;

technique makewater
{

pass p0
{

/////////////////////////////////////////
// stage 0 /
/////////////////////////////////////////
Texture[0] = <mtlSkin1>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;

ColorArg1[0] = Texture;
ColorOp[0] = bumpenvmap;
ColorArg2[0] = current;

TextureTransformFlags[0] = Count2; // | Projected;
TextureTransform[0] = <matMtl>;

///////////////////////////////////////
// stage 1
///////////////////////////////////////
Texture[1] = <mtlSkin2>;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;

AddressU[1]=Clamp;
AddressV[1]=Clamp;

ColorArg1[1] = Texture;
ColorOp[1] =selectarg1;

TextureTransformFlags[1] =count3 | projected;

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

colorop[2] = disable;
alphaop[2] = disable;

}

}

technique fallback { pass p0 { } }

";
}

action ffp_water {

my.transparent=on;
my.alpha=90;

my.material = mtl_ffpwater;

}

bmap waterbump = <waterbump.bmp>;
bmap envspec = <sky1.tga>; // <skycube+6.tga>;


function mtl_ffpwater_1()
{

///////////////////////////////////////////////
// Lets make it scroll in some direction
//

mtl.skill1 += time;
mtl.matrix41 = floatd(mtl.skill1,4000);


}

function mtl_ffpwater_init()
{

mtl.matrix11 = float(1.6);
mtl.matrix22 = float(0.8);

bmap_to_mipmap(mtl.skin1);
bmap_to_mipmap(mtl.skin2);

bmap_to_normals(mtl.skin1,10.5);

bmap_to_cubemap(mtl.Skin2);

mtl.event = mtl_ffpwater_1;

mtl.enable_view = on;

}


material mtl_ffpwater
{
skin1=waterbump;
skin2=envspec;

event = mtl_ffpwater_init;

effect = "

matrix matMtl;

texture mtlSkin1;
texture mtlSkin2;

technique makewater
{

pass p0
{

/////////////////////////////////////////
// stage 0 /
/////////////////////////////////////////
Texture[0] = <mtlSkin1>;

magFilter[0]=linear;
minFilter[0]=linear;
mipFilter[0]=linear;

ColorArg1[0] = Texture;
ColorOp[0] = bumpenvmap;
ColorArg2[0] = current;

TextureTransformFlags[0] = Count2; // | Projected;
TextureTransform[0] = <matMtl>;

///////////////////////////////////////
// stage 1
///////////////////////////////////////
Texture[1] = <mtlSkin2>;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;

AddressU[1]=Clamp;
AddressV[1]=Clamp;

ColorArg1[1] = Texture;
ColorOp[1] =selectarg1;

TextureTransformFlags[1] =count3 | projected;

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

colorop[2] = disable;
alphaop[2] = disable;

}

}

technique fallback { pass p0 { } }

";
}

action ffp_water {

my.transparent=on;
my.alpha=90;

my.material = mtl_ffpwater;

}
Posted By: Buluen

Re: Shader wie in Morrowind - 07/12/04 03:01

cool shader I tested it out and heres a comparison between one of steempipes shaders.
http://www.freewebs.com/buluen/index.htm
Posted By: zSteam_

Re: Shader wie in Morrowind - 07/12/04 03:58

Hi Buluen
can you send me your Bmaps from the shader
my E-Mail: lord_alrik@web.de
© 2024 lite-C Forums