HLSL Water Effect....

Posted By: Steempipe

HLSL Water Effect.... - 09/27/04 11:30

Been playing with some HLSL code. And have a first draft of some water.

It runs on my GeForce 5500 FX. Now I wonder if it will run on an ATI since mine is sitting here on the floor.

Still lots of work to do on it... but if it does not run on a majority of the cards.........

Lets see.... DX 9c... VS.1.1 and PS.1.1.

hlsl_water_1.zip approx 3.9 MB


Posted By: iprogramgames2

Re: HLSL Water Effect.... - 09/27/04 11:37

Looking good. Works on my 9700 Pro.
Posted By: Nardulus

Re: HLSL Water Effect.... - 09/27/04 11:39

It works on my Ati 9700 good work.

Would you be willing to share the HLSL.

Ken
Posted By: alienheretic

Re: HLSL Water Effect.... - 09/27/04 11:40

looks great on my GFX 5800 awesome work as always
Posted By: muralist

Re: HLSL Water Effect.... - 09/27/04 12:25

Its good on Geforce FX5200 128 DX9c in both 3dGS 6.31 and 6.22.
Posted By: Drew

Re: HLSL Water Effect.... - 09/27/04 12:41

THATS SWEET! radeon9600 m10 ran great

please share the shader!
Posted By: Blattsalat

Re: HLSL Water Effect.... - 09/27/04 13:12

works on my 9800pro very well and very fast

great work...but why cant i move arround...would make life easier
Posted By: Orange Brat

Re: HLSL Water Effect.... - 09/27/04 13:14

Great effect. 5200FX 128
Posted By: William

Re: HLSL Water Effect.... - 09/27/04 13:49

Whoa! Works Great on my Radeon 9800! It would be great if you could share the code!
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/27/04 18:15

Well, glad that it is working. Thanks for trying~ again.

I want to work out some aspects of the effect before I post any code. Mostly in the area of the texture scaling and shifting.

I suppose it would be nice to walk around, too.
Posted By: SchokoKeks

Re: HLSL Water Effect.... - 09/27/04 22:06

My gosh!
A watershader that finally works on my Geforce 3 Ti 200. Well done Steempipe!

The waves I see are too abnormal and erratic. Make then a little slower and more regular. The shader seems to be best for small (mountain) lakes.

Keep on the good work
(And don't forget the conversion of the terrain multitexturing shader )
-SchokoKeks
Posted By: TimeOut

Re: HLSL Water Effect.... - 09/27/04 22:18

Looks very good.
Works good on my Radeon 9800Pro
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 00:39

Quote:

My gosh!
A watershader that finally works on my Geforce 3 Ti 200. Well done Steempipe!

The waves I see are too abnormal and erratic. Make then a little slower and more regular. The shader seems to be best for small (mountain) lakes.

Keep on the good work
(And don't forget the conversion of the terrain multitexturing shader )
-SchokoKeks




Okay.. Looks much better with a new normalmap that ripples the water in a more fluid, wind-kissed way. Also, I got the code changed that will allow scaling of the textures, and to shift the textures while contolling the speed/direction.

The demo has a hack in there, based on time, to do some UV shifting.

And yes, for my project, this water I specifically am designing for a mountain type pond/lake. However, I do have a good start on a large body water effect, too.

Eric
Posted By: ventilator

Re: HLSL Water Effect.... - 09/28/04 00:47

cool! ...works on my gf4. is this per pixel cube mapping?
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 01:10

Correct, per pixel cube mapping with a nonconstant view position. Transparency is adjusted in the pixelshader. The cubemap is static.
Posted By: Red Ocktober

Re: HLSL Water Effect.... - 09/28/04 01:15

... hey, it even works on my Radeon 9200

ripples and all... nice work Steem'

question, do you think that this effect can be applied to an 'ocean' matrix with undulating waves?

--Mike
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 01:29

It could be applied to an ocean with undulating waves. Thing is this; There are a number of items that need to be added to the vertexshader to really make it a great looking ocean shader. It would do well as-is, but it would be nice to alpha fade the edges near shore, and to lerp some colors for depth appearance.

My next plan is to get the stupid Fog working in my HLSL code. It eludes me right now.
Posted By: ventilator

Re: HLSL Water Effect.... - 09/28/04 01:33

oFog = 1 - (distance(vertex_w, vecViewPos) - vecFog.x) * vecFog.z;

i use this for fog. vertex_w = vertex in world space.
Posted By: Red Ocktober

Re: HLSL Water Effect.... - 09/28/04 01:44

thx Steem'... i understand that this is a work in progress... i'll be content to wait until you have it just the way you want...


and...


THANKS not only for sharing the code, but for taking us along for the ride during development...

--Mike
Posted By: Drew

Re: HLSL Water Effect.... - 09/28/04 02:51

I notice the sky texture is distorted in the reflection, !
Is this the pro only view to Texture, or done in shader, using an assigned bmp?
Posted By: MMike

Re: HLSL Water Effect.... - 09/28/04 04:43

I got error.. coulnd't initialize Direct X 9!???

I have A geForce FX 5600 256 mb... and Direct X 9 C installed!..whats wrong?? My card supports Vertex shader 2.0 And pixel Shader 2.0
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 04:48

The pixelshader "distorts" the envmap. Pro is not needed.
Posted By: Rhuarc

Re: HLSL Water Effect.... - 09/28/04 05:01

Runs great... but the texture is pixelated, gotta add the linear filtering . Radeon 9200

-Rhuarc
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 05:14

Quote:

I got error.. coulnd't initialize Direct X 9!???

I have A geForce FX 5600 256 mb... and Direct X 9 C installed!..whats wrong?? My card supports Vertex shader 2.0 And pixel Shader 2.0




I have not had that error yet, with any effects. Was there any other information??
I don't know if anyone else with a 5600 has run the thing yet to compare notes to.
Posted By: MMike

Re: HLSL Water Effect.... - 09/28/04 05:15

Sorry but can anyone askwer me??..what it says DX 9 Eroror.. could not initialize!?
Posted By: Drew

Re: HLSL Water Effect.... - 09/28/04 05:40

Quote:

The pixelshader "distorts" the envmap. Pro is not needed.




Sweet BTW ran fine on my 5600fx at work...
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 05:50

Blattsalat: Sorry to have made you paralyzed! You may be able to walk around here ~ 5MB .
Posted By: Pappenheimer

Re: HLSL Water Effect.... - 09/28/04 07:30

After installing the directx9_redist-thing, it runs on my Radon 9200 SE, but not on my Geforce2 MX .

BTW, thank you for all your kind contributions!
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 07:48

Pappenheimer: No matter what I do.... I cannot get FFP EMBM to work right (for cards without pixelshaders)!! So most likely I will drop working on that for awhile However, I do have some ideas that I may investigate at some point.

Ventilator: The fog math worked well.... well, after I hammered out the damn VS_IN/OUT stuff. There may be a whole new opportunity for producing some fog effects here! Muchas Gracias!
Posted By: MMike

Re: HLSL Water Effect.... - 09/28/04 07:56

It needs DX 9C now t works
Posted By: Nadester

Re: HLSL Water Effect.... - 09/28/04 08:09

Awesome! Looks great on my Geforce 6800 GT!
Posted By: Blattsalat

Re: HLSL Water Effect.... - 09/28/04 08:19

thanks, changing the view shows a lot more of the shader...it really looks cool, and it runs very fast on my machine.

Only thing that would add more detail to this shader would be if you could use the twirl effect (=the standard water in gs twirl) as well. Right now you can see its "only" uv-shifting.

Looking forward for more (this shaders are getting more and more serious in the last few weeks)
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 08:35

Quote:

Only thing that would add more detail to this shader would be if you could use the twirl effect (=the standard water in gs twirl) as well. Right now you can see its "only" uv-shifting.





Thats a good idea. So many things to be done, just gotta figure out how
Posted By: ventilator

Re: HLSL Water Effect.... - 09/28/04 08:47

maybe by adding some sinusoidal distortion to the texture coordinates?

i haven't tested this yet. do the hlsl sin()/cos() functions compile to vs_1_1? it would be great if there weren't the need for manually doing taylor series anymore!
Posted By: William

Re: HLSL Water Effect.... - 09/28/04 08:53

This is great! I hope that you'll get around to creating an ocean shader for v.s 1.1 and p.s 1.1 as well! Hopefully you'll figure out whats wrong with getting EMBM to work with FFP soon, since fallback would be awsome!! Thanks for not giving up and all your hard work!
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/28/04 09:39

Glad ya all like the effect.

Ventilator: I added this~ float FreqPulse = sin(Frequency * PI * vecSkill41.x);
The compiler didn't choke. It did what was expected, a kind of pulse.

So, maybe there is hope for your idea here.
Posted By: Marco_Grubert

Re: HLSL Water Effect.... - 09/28/04 09:53

Works great on GeForce 3.. :-)
Posted By: Nardulus

Re: HLSL Water Effect.... - 09/29/04 23:49

This works on my Ti 4400.

Now that is truly impresive.

Ken
Posted By: MMike

Re: HLSL Water Effect.... - 09/30/04 02:57

Works On my GeForce FX 5600
Posted By: indiGLOW

Re: HLSL Water Effect.... - 09/30/04 03:49

Ati 9800Pro 128Mb - Check!
Posted By: Darkstorm

Re: HLSL Water Effect.... - 09/30/04 06:33

This is indeed some nice work. All I have to say is gimee gimee gimee code .

Oh and it works great on my GeForce3, 4 and Radeon.
Posted By: dleuen

Re: HLSL Water Effect.... - 09/30/04 06:39

Holy crow that looks nice. If you give us the code Jeff Frazer will drive to Maryland and wash your car for a year (well I never asked Jeff but I'm sure he wouldn't mind). Nice work!

Don
Posted By: Steempipe

Re: HLSL Water Effect.... - 09/30/04 06:53

Quote:

thx Steem'... i understand that this is a work in progress... i'll be content to wait until you have it just the way you want...


and...


THANKS not only for sharing the code, but for taking us along for the ride during development...

--Mike




Thanks! This water has been a friggin' headache! Actually, it still is in some areas.

@Everyone....There is still work to be done on the effect. When it realizes more potential, I plan on posting the code....

I'm glad that y'all are posting card info and suggestions.

hmmmmm..... car wash, eh? I'd rather have the grass cut

Eric
Posted By: Darkstorm

Re: HLSL Water Effect.... - 09/30/04 07:40

What is this a temp service? A car wash for code is a bit unorthadox but I guess it could work . Hell, considering how long I have been looking for a good water shader I'll cut the grass too.
Posted By: light_mystic

Re: HLSL Water Effect.... - 09/30/04 10:30

Very nice! I heard about to look in the shaders forum for this shader you was doing steempipe from Romac.
Posted By: Turotulco

Re: HLSL Water Effect.... - 10/01/04 01:35

Stunning on my Radeon 9600XT. Everything is being done with the shaders, no mesh deformation, correct? Looks very, very nice.
Posted By: Steempipe

Re: HLSL Water Effect.... - 10/01/04 08:31

You're right, there is no mesh deforming here. That's for later....

It's basically the, pixelshader.1.1 and vertexshader.1.1, equivelent of the fixed-function BumpEnvMap.
Posted By: Metal_Thrasher

Re: HLSL Water Effect.... - 10/01/04 11:59

It sadly wont work on my Radeon95000 Damn people at Staples ripped me off, saying it supported pixel shading!
Posted By: sriram

Re: HLSL Water Effect.... - 10/01/04 15:52

Looks great on my FX 5200...I wish I could walk through it...you are going to add thhat feature soon arent you ? Nice job sofar!
Posted By: 20BN

Re: HLSL Water Effect.... - 10/01/04 16:27

it was worked on my ti4200.
Posted By: Steempipe

Re: HLSL Water Effect.... - 10/01/04 17:22

Quote:

It sadly wont work on my Radeon95000 Damn people at Staples ripped me off, saying it supported pixel shading!




Strange... What happens?? An Error?? If so, what is it??

Also, you need DirectX 9.00 C.

@sriram: version #2 later in the thread you can walk around, if thats what you mean.
Posted By: Falke3D

Re: HLSL Water Effect.... - 10/05/04 02:45

It works great on geforce FX 5900.
testet hlsl_water_1.zip.

But my other shaders create some errors on
my Pro 6.31
Posted By: R4v3n

Re: HLSL Water Effect.... - 10/05/04 04:42

Thanks, at Readeon 9800 Pro it looks nice ! Where is the code ?!
Posted By: Marco_Grubert

Re: HLSL Water Effect.... - 10/05/04 05:18

Quote:

It sadly wont work on my Radeon95000 Damn people at Staples ripped me off, saying it supported pixel shading!


Make sure you have the most recent DirectX and ATI catalyst installed. A Radeon 9500 definitely has the firmware to run this demo.
Posted By: Steempipe

Re: HLSL Water Effect.... - 11/06/04 07:08

Let's see...... Finally got a few things hammered out with this code. I needed to convert it to ASM, buildable with 6.22.0, and should run on a DX8.1 machine.

If somebody... with a DX8.1 environment could test this I would be very thankful.

About 2.30 MB

Thanks!
Eric
Posted By: Red Ocktober

Re: HLSL Water Effect.... - 11/06/04 10:50

i downloaded and went to test it on my dx8.1 machine, forgetting that the video card in it is a GeForce4MMX, and wouldn't show anything anyway...

the app ran, and i got a transparent dark plain where the shadered water should be...

sorry...

--Mike
Posted By: Thomas_Nitschke

Re: HLSL Water Effect.... - 11/06/04 20:38

Hey Steempipe! This is truly a GREAT effect! Even the ASM version runs fine and very fast on my g4ti4200!
Will this thing become open-source some time?

Posted By: Steempipe

Re: HLSL Water Effect.... - 11/06/04 22:20

I am leaning towards yes. That is, making it available. There are a number of things I would like to do to it first, but I may not have the time. Now I just hope that my hard-drive does not bomb..... I still have not backed any code up for the last 8 weeks or so.

Still need to know if it runs on DX8.1....
Posted By: Thomas_Nitschke

Re: HLSL Water Effect.... - 11/07/04 22:31

That's the right way, just release the code and give a +&(§ on what you wanted to do first

No, seriously, it would be very nice to have this water shader open-source

PS: What do you mean by directX 8 here? Do you want to know if it works on dx 8 cards or if it works with dx 8 installed (thus without dx9)? If you were wondering about the first point, as I said: works very well on g4ti4200 which actually is a dx8 card
Posted By: Steempipe

Re: HLSL Water Effect.... - 11/07/04 23:02

Quote:

That's the right way, just release the code and give a +&(§ on what you wanted to do first

No, seriously, it would be very nice to have this water shader open-source

PS: What do you mean by directX 8 here? Do you want to know if it works on dx 8 cards or if it works with dx 8 installed (thus without dx9)? If you were wondering about the first point, as I said: works very well on g4ti4200 which actually is a dx8 card




Yah.. that was all... Since there are a fair amount of target cards that will not support the DX9 for awhile, _and_ the fact that alot of people with 3DGS may remain commited to using A6.22 for awhile, depending upon their projects and so on. I needed to know if the code would fulfill those needs.
All I could do is modify it to make sure it would build on A6.22, I was sure that it would work on the DX8 cards, because it is basic pixelshader1.1 code.... but it is nice to know for sure before claiming it does

Maybe I release it soon...... It would be cool to see other features and modifications added to it. But I doubt that that code would get posted.

This f^%kin thing was a thorn in my side for months on end... right now it is just sitting... aquiring dust more or less. It needs more work for Action Bird, but the terrain shaders are in need of that, too.
© 2024 lite-C Forums