water shader (real-time reflections)

Posted By: 3run

water shader (real-time reflections) - 02/11/13 14:42

I wanted to ask, if there is a water shader around the forum? As I couldn't find anything myself.. The native one looks crap, with some strange reflection offsets.. I tried the older shade-c water and I loved it, but I got some troubles with it as well (some black lines, on the edges with level blocks and a black point, at the center of the water model, which becomes bigger on the distance). I need a translucent water shader with real-time reflections, and I would be really grateful if someone could point with a right link to it. I'm a shader noob, so no way for me to make it myself.
Posted By: 3run

Re: water shader (real-time reflections) - 02/11/13 18:52

Ok.. So after I've spent the whole fucking day, trying to get some results with the native water shader...
I found out, that an old one, works pretty nice (there is an old one and new, if you'll check "mtlFX.c")..
As I've said, that I've faced offset problem (with new one), I couldn't fix it.. Here is how it looks like:

But I've decided to go with an old one (maybe it's slower, I don't really know), and it looks pretty nice..
Here is the screen:

The color of the water is adjustable (this is default color). I've decided to rip it out, and to upload it here:
Water Shader (OLD)
Thanks once again, this community is just freaking awesome.
Posted By: gri

Re: water shader (real-time reflections) - 02/12/13 09:17


hey thank you,

I realy like to see when guys gives their results for free.
Posted By: HeelX

Re: water shader (real-time reflections) - 02/12/13 09:37

Yeah, looks cool, thanks for sharing! But I am wondering about the ASM part in the shader, can you explain that?
Posted By: sivan

Re: water shader (real-time reflections) - 02/12/13 10:22

hi thanks, I'm also looking for a better water shader. in a demo of Slin I found a nice river shader, something like that is what I need, beside a sea-like shader... Emre also had some nice water shaders, and he has also a little tool for making them, maybe you can check them too.
Posted By: 3run

Re: water shader (real-time reflections) - 02/12/13 10:52

Hi guys, and it's really nice too see that you've found it useful as well, this makes sense for being here and uploading stuff.

HeelX@ I really have no idea about ASM part, as I didn't rewrite/redone the shader at all, I just riped it out and made a demo.

Edit: sivan@ thank you for help, I'll take a look at those examples as well.
Posted By: sivan

Re: water shader (real-time reflections) - 03/13/13 11:36

if you change in mtlFX.c bmap_to_uv to bmap_to_normals (I just wrote 50 as factor value), the mirrorWater shader works without offset. there is a difference between the 2 resulting textures, but if the ripple and scale values are increased a bit, you can get nearly the same result.

p.s. Slin also made a shader collection incuding water shader. I have not tested it yet, so I don't know how it works... you can download it from AUM or from the forum, I don't remember.
Posted By: 3run

Re: water shader (real-time reflections) - 03/13/13 11:43

sivan@ I guess you mean this. haven't tried the water shader yet laugh
I've seen a lenceflare script included in the main script of the demo, but it's not there frown
Posted By: sivan

Re: water shader (real-time reflections) - 03/13/13 12:34

yes, it is what I talked about, the lensflare line should be commented and it works.
Posted By: 3run

Re: water shader (real-time reflections) - 03/13/13 12:38

Originally Posted By: sivan
the lensflare line should be commented and it works.
Yes I know, but I would like to see them frown
Posted By: HenWoll

Re: water shader (real-time reflections) - 01/09/17 08:33

hey Thanx ! i really like this water more than my older part ^^

here the result

Posted By: 3run

Re: water shader (real-time reflections) - 01/09/17 09:21

Hey, I'm happy that you found it useful. And it looks nice too! I would increase texture resolution, to get better quality laugh

Best regards!
Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/09/17 12:19

Have you by chance tried it with shade-c (evo) too? Also nice pic BlackJack.
Posted By: HenWoll

Re: water shader (real-time reflections) - 01/09/17 15:28

Quote:
Have you by chance tried it with shade-c (evo) too?


look at the screenshot, im using Shade-c , it works ^^

Quote:
Hey, I'm happy that you found it useful. And it looks nice too! I would increase texture resolution, to get better quality


I would like but then I would have to suffer the performance,
Currently it is 60 fps
With bigger texture it goes to 20-30 frown
Posted By: 3run

Re: water shader (real-time reflections) - 01/09/17 16:10

Originally Posted By: BlackJack
I would like but then I would have to suffer the performance,
Currently it is 60 fps
With bigger texture it goes to 20-30 frown
It's really sad to hear that...
Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/09/17 18:12

When I am trying to use it in my own project it gives this error:

"Can't compile effect:
mirrorWater.fx(61,24): error X3004: undeclared indentifier
'vecSkill41'"...etc...

Probably missing something obvious?

-edit; never mind I needed to put fx file in the workfolder instead of a subfolder (probably a gs3d default shader with the same name was otherwise used).
Posted By: HenWoll

Re: water shader (real-time reflections) - 01/09/17 18:31

are you includet the D3DCompiler_42.dll file ?
Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/09/17 18:32

I just fixed it, see the edit grin
Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/09/17 19:00

Hmm now its entirely black. :\
Posted By: HenWoll

Re: water shader (real-time reflections) - 01/09/17 20:09

remove the fog grin same error
Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/09/17 21:28

I am now testing it in the shade-c example 2 but the reflections are still not working entirely correct (only the pillar and car windows), this is what I am getting (1st pic is with sc_screen_default.settings.forward.enabled = 1; , 2nd pic is with sc_screen_default.settings.forward.enabled = 0;):

ps: it looks a bit weird since I removed the concrete floor and added a water.mdl with null action but with shade-c material as floor (below the mirrored water model).



Posted By: Reconnoiter

Re: water shader (real-time reflections) - 01/12/17 16:13

Finally some luck with Steempipe's water shader from 2004 grin (+ quick and dirty added alphachannel). Would be even cooler if it would support shade-c lights but I dont think that is possible, atleast it moves. laugh

[ location: Shadermodel 1.0-1.4 folder from the Massive 3DGS Shadercollection lite c ]



(With original texture which has no added alphachannel)
Posted By: Steempipe

Re: water shader (real-time reflections) - 05/01/17 00:51

I think we need to update that 2004 POS... laugh Cool thing with the Alpha hack.

Can you send me that version? I don't have it. frown


© 2024 lite-C Forums