Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,295 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
water shader #35664
11/04/04 01:03
11/04/04 01:03
Joined: Nov 2004
Posts: 33
S
StevieF Offline OP
Newbie
StevieF  Offline OP
Newbie
S

Joined: Nov 2004
Posts: 33
Although i search on this forumn i cannot find a rippling water fx file that works. Do i simply load the fx file in, then attach the texture i wish to be affected??/ I tried steampipe water shader - but the image was just black?

Re: water shader [Re: StevieF] #35665
11/04/04 01:39
11/04/04 01:39
Joined: Oct 2004
Posts: 9
A
Alexzx Offline
Newbie
Alexzx  Offline
Newbie
A

Joined: Oct 2004
Posts: 9
same result, no water

Re: water shader [Re: StevieF] #35666
11/04/04 01:53
11/04/04 01:53
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
are you sure your grakas can handle shaders?

Re: water shader [Re: Joey] #35667
11/04/04 02:17
11/04/04 02:17
Joined: Oct 2004
Posts: 9
A
Alexzx Offline
Newbie
Alexzx  Offline
Newbie
A

Joined: Oct 2004
Posts: 9
I have geforce 4
in all games shaders fork fine, all water scripts that I found not work for gamestudio

Last edited by Alexzx; 11/04/04 02:18.
Re: water shader [Re: Alexzx] #35668
11/04/04 05:40
11/04/04 05:40
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
It's not great... but it may give you a start. You'll have to play with the textures. You can modify it alot... Leave it as is, and/or modify it with some pieces of code from the ones that turn black. Things like the projected texture. Adding another stage with a colormap or envmap.

However, you will not be able to add a lookup into a cubic environment map. The Geforce will not do the dependant texture reads for it.

The pixelshader.1.1 water code I have is not open source yet... sorry.



Code:
 
bmap water_bump = <water_bump.tga>;
bmap water_spec = <water_spec.tga>;

function mtl_water_func();

function mtl_water_func()
{

mtl.skill1 += time;

mtl.matrix23 = floatd(mtl.skill1,180); // u offset ????? Something changed????
mtl.matrix13 = floatd(mtl.skill1,200); // u offset

}

function mtl_water_init()
{

mat_set(mtl.matrix,matWorld);
mtl.matrix11 = float(4.5);
mtl.matrix22 = float(2.0);
mtl.matrix41 = 0;
mtl.matrix42 = 0;
mtl.matrix43 = 0;


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



mtl.event = mtl_water_func;
mtl.enable_view = on;
}

material mtl_water
{
skin1=water_bump;
skin2=water_spec;

event = mtl_water_init;

effect = "
matrix matMtl;

texture mtlSkin1;
texture mtlSkin2;


vector vecLight;

technique ffpwater
{

pass p0
{
AlphaBlendEnable = True;

Lighting = True;
DitherEnable = True;
zWriteEnable = True;
zEnable = True;
CullMode = none;

specularenable=true;
ambient= <vecLight>;//0x00010104;


Texture[0] = <mtlSkin1>;

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

ColorArg1[0] = Texture;
ColorOp[0] = BumpEnvMapLuminance;
ColorArg2[0] = Diffuse;

BumpEnvLScale[0]=0.1;
BumpEnvLOffset[0]=0.8f;

TexCoordIndex[0]= 0;
TextureTransformFlags[0] = Count2;

TextureTransform[0]=
{
3.0, 0.0, 0.0, 0.0, //u
0.0, 6.0, 0.0, 0.0, //v
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0
};


Texture[1] = <mtlSkin2>;

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

ColorArg1[1] = Texture;
ColorOp[1] =Modulate;
ColorArg2[1] = Current;

TextureTransform[1] = <matMtl>;
TextureTransformFlags[1] =count2;
TexCoordIndex[1]= 1;

ColorOp[2] = Disable;
AlphaOp[2] = Disable;

}



}


technique fallback { pass p0 { } }
";
}




action ffp_Water {
my.metal=off;
my.flare=off;
my.transparent=on;
my.alpha=60;


my.material = mtl_water; }





Re: water shader [Re: Steempipe] #35669
11/04/04 07:42
11/04/04 07:42
Joined: Sep 2002
Posts: 700
Orange County, CA
L
LogantheHogan Offline
Developer
LogantheHogan  Offline
Developer
L

Joined: Sep 2002
Posts: 700
Orange County, CA
Shaders only work with the Commercial and Pro editions, I think. That would be a problem if you just had trial or something.

Logan

Re: water shader [Re: LogantheHogan] #35670
11/04/04 19:16
11/04/04 19:16
Joined: Oct 2004
Posts: 9
A
Alexzx Offline
Newbie
Alexzx  Offline
Newbie
A

Joined: Oct 2004
Posts: 9
I have6.31 comm, dx9c
why not open source?

Re: water shader [Re: Alexzx] #35671
11/05/04 09:34
11/05/04 09:34
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Quote:

why not open source?




That's a good question


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1