Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / EVOLVED Water Shader made easy to implement

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 8th Jul 2006 15:57
if anybody is having trouble adding the water shader in their own projects, here is an easy way.

Attachments

Login to view attachments
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 12th Jul 2006 19:06
"Set Camera Clip" is not a command, is it? i couldn't compile it. (i have U6.1)

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 12th Jul 2006 19:11
you need to upgrade to DBPro U6.2b
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 12th Jul 2006 19:20 Edited at: 12th Jul 2006 19:21
very nice indeed!

has he written a new water shader then? because the one i used, when you go close to the water, the water draws a cross or something like that.. this one on the other hand was very nice.

Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 12th Jul 2006 19:50
after i added it to my project (which was very easy) i noticed the framerate dropped from 60 to 33. and i was not able to change the resolution of the water reflection. seems like 128x128 is the maximum allowed.

a great shader, but i think i will stick with the one i allready had

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 12th Jul 2006 20:19 Edited at: 12th Jul 2006 20:23
*128x128 is enough, the bigger the slower.But if you really must change it, change following function like this:

Where you must change the 512 value to any size square of 2
*the one you already had doesnt reflect realistic unless you add the camera clipping to it.
there are optimisations to the shader, but this one is EVOLVED's so i wouldnt send a changed version here.
However, here is a tip to optimise the code not the SHADER..
camera 30 is not used in the above example because i didnt need refractions.
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 12th Jul 2006 21:14
oh, thank you very much

Freddix
AGK Developer
22
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 12th Jul 2006 21:18
Evolved shaders are simply .... jewels :p

All we have to decide is what to do with the time that is given to us.

Login to post a reply

Server time is: 2024-11-23 03:23:51
Your offset time is: 2024-11-23 03:23:51