1 registered members (AndrewAMD),
600
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
water shader (real-time reflections)
#417316
02/11/13 14:42
02/11/13 14:42
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
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.
|
|
|
Re: water shader (real-time reflections)
[Re: 3run]
#417341
02/11/13 18:52
02/11/13 18:52
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
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.
|
|
|
Re: water shader (real-time reflections)
[Re: 3run]
#417395
02/12/13 09:17
02/12/13 09:17
|
Joined: Dec 2003
Posts: 1,225 germany
gri
Serious User
|
Serious User
Joined: Dec 2003
Posts: 1,225
germany
|
hey thank you,
I realy like to see when guys gives their results for free.
"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
|
|
|
Re: water shader (real-time reflections)
[Re: sivan]
#417399
02/12/13 10:52
02/12/13 10:52
|
Joined: May 2009
Posts: 5,370 Caucasus
3run
OP
Senior Expert
|
OP
Senior Expert
Joined: May 2009
Posts: 5,370
Caucasus
|
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.
Last edited by 3run; 02/12/13 11:47. Reason: ***
|
|
|
Re: water shader (real-time reflections)
[Re: 3run]
#419669
03/13/13 11:36
03/13/13 11:36
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
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.
Last edited by sivan; 03/13/13 11:39.
|
|
|
|