Posted: 6th Jun 2007 20:21
Here is a free PS 1.1 water shader. All media and a working DBP demo are included in download. This is my own OPEN SOURCE code. Anyone is free to use it however they please. It is also a work in progress, so any improvemants I make will be updated here. Refraction/Reflection is nearly impossible in a 1.1 shader so forget it. It's not going to happen! I am currently working on making the water more transparent.

Enjoy!
Posted: 7th Jun 2007 0:04
No offence intended, but what exactly is this shader supposed to do? Using a regular transparent texture would look better. It seems when I rotate and move the camera it seems to stretch and smear the water texture.
Posted: 7th Jun 2007 0:27
If this works okay i may use it instead of the regular mirror effect that i am now, which looks like turd by the way.
Posted: 7th Jun 2007 0:57
do you allow me to include it in the free: Ultimate Shader Pack ?
I'll host a new build of the pack @ www.odyssey-creators.com website
Posted: 7th Jun 2007 11:19
can you post a screen shot of what it is supposed to look like, cause i just get a black plane, although my card supports shader model 1.3.
Posted: 11th Jun 2007 20:49
Hi guys,
I've been really busy the past few days. We had a fire at work and things have been kinda crazy. I'm sorry about the defective PS 1.1 shader. It works perfectly in all my apps. EXCEPT DBP. I should have done more testing before posting it. I will try to find out why it doesn't work correctly in DBP ASAP.

If any one is interested, I have a PS 1.4 water shader with reflections. Here is a screen shot.
Posted: 11th Jun 2007 20:55
Here is the DBP code with shader and media included. This shader has been tested thoroughly and works in DBP 6.6
Posted: 12th Jun 2007 0:13
I suppose it looks okay for big scenes. You may want to post in JPEG next time, MS Paint will do that
Posted: 12th Jun 2007 0:18
I like the PS1.4 version. Nice work. (Code could be tidied up a bit here and there, though.)

Have you got an HLSL version of your PS1.1 water shader? It would be easier to see what's wrong with it then. All I see is a uniform blue plain against a black background.
Posted: 12th Jun 2007 19:08
I'd like to get a water shader with reflection and transparancy. Needs to be fast though. I'm okay up to shader 2.0

Here's a screenshot of your 1.4 version in .jpg so ppl don't have to download that huge .bmp



It seems pretty fast, well done, but it doesn't reflect objects in the scene like the standard DBP reflection shader can do.



and a little bit of transparancy for object poking out would make it look more realistic too me thinx.



Evolveds is the best I've seen in DBP, but it's a bit too slow, yeah that does say 11 fps!
Posted: 13th Jun 2007 3:35
@ Freddix
Yes you can use the PS1.4 shader in the Ultimate Shader Pack.
The PS 1.1 shader has a defect that I am trying to correct.

@ GG
Thanks, No I don't have a HLSL version of the 1.1 shader. I am trying to convert it now.

@ GatorHex
No Offense, but if you want it, BUILD IT. You are comparing apples with oranges. The shader was never intended to have real time reflections. Also adding transparency is not going to happen. There simply isn't enough resources left in a PS1.4 shader to do it. It already is at the limits of being able to compile in PS1.4
You are severely limited in 1.4 shaders. (number of textures, dependent reads,number and type of instructions etc.)

To everyone: I only made this shader to try to give a decent water shader to the users who don't have 2.0 capability. I don't even need it myself. I have 3.0 capability. So if you want to use it fine, if you don't, also fine. But stop comparing 1.4 with 2.0 shaders. It's like complaining that Vista operating system won't run on my old Windows 95 machine.
To anyone offended by this post, I am truly sorry.
Posted: 13th Jun 2007 14:55
I haven't a clue about shaders, and i wasn't being critical of your work, i was just wondering is somone, like yourself, could build a perfect 2.0 water shader. Its unlikly i could do it myself, and i appreciate yours and Evolveds efforts
Posted: 21st Jun 2007 16:23
Sorry about the late post, I've been very busy lately.

@ GatorHex

My sincerest apologies to you. I didn't mean to come on so strong.
I'm not sure if everything you want in a water shader is possible in DBP. If you could use multiple shaders on the smae object at the same time it would be possible. But as far as I know, DBP only lets you use one shader at a time on a single object. I'll do some more research and see what I can come up with. Also, you are correct in saying that most of the calculations in Evolved's shader is done in the DBP program. I have done a similar set up in DBP and came up with only 17 fps. (Not Good) I'll see if I can get something better.

Meanhile I still haven't found the bug in the 1.1 shader. I'll keep working on it too.
Posted: 21st Jun 2007 16:42
I havn't a clue about shaders (Havn't even attempted to learn them yet)
I've got a few questions/ideas..
1st.. Can shaders call other shaders
if so, why not write a superfast shader for each of the following..
(Vertex Manipulation) to make waves by adjusting vertex position.
(Bump Mapping) to give smaller ripples
(Fresnel Shadding) to give angle relative transparency
(Reflection Shading) to reflect environments and objects.
Then use a water shader to call each in turn before updating the display.
Posted: 13th Jul 2007 6:04
I want to know about the "Default DB Shader - that Mirror Looks Grand!
Posted: 13th Jul 2007 17:29
the default db mirror shader is very slow. Its way too slow for any real use. try it and see, it eats fps like i eat kebabs!
Posted: 13th Jul 2007 17:43
I dissagree I think it's fast, in the above screen shot I was getting 120fps on a Pentium M1.5Ghz with Intel 915 Graphics, not exactly a speed machine
Posted: 15th Jul 2007 2:44
Spotaru, wow, i love this shader, it's very fast and it looks very good, i'm having trouble getting the water to reflect my own skybox, i tried replacing the mountains.dds file with my own sky, but it doesnt work tell me, what do i need to do to make it work?
Posted: 15th Jul 2007 8:41
Open the .fx file with notepad and replace the name of the reflection texture with the name of your sky cubemap. It works for me when I change it. If that doesn't work, post your sky and I'll see if I can make it work for you.
Posted: 15th Jul 2007 15:35
here's the sky i would like it to reflect, it would be super if you could make it work