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.

Dark GDK / Ultimate Shader Pack Water Problem

Author
Message
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 18th Dec 2010 11:55 Edited at: 18th Dec 2010 12:00
Hello,

I have been experimenting with shaders, and making shaders.

But I got stuk .

I have downloaded the dbpro example of The shader pack and I fully converted it to DarkGDK.

Here's the code:
OnCreate(Before Loop):


Cycle(InLoop):


Here's a screenshot in a scene of the current water effect.
(I'm sure this has something todo with the camera's.)



I hope somone know's the trick.

Note: I have searched through the forum and I read alot about shader coding and this shader. But didnt work out. I would like to know how I can accomplish the effect, so I can actually learn something from it.

Thanks!

RedEye

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 18th Dec 2010 16:48
I would really like an explanation, some help, plz.

silken
20
Years of Service
User Offline
Joined: 13th May 2004
Location:
Posted: 19th Dec 2010 18:43
hi

I look your code and for the Begin I don't understund this "if"!!

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 19th Dec 2010 19:48
Yeah dont understand it either. It IS what dbpro code says in the ultimate shader pack . But will see if I can do something with it.

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 19th Dec 2010 20:12 Edited at: 19th Dec 2010 20:15
Well this if(Ypos>0) thing is completly useless, because you are doing the same in both cases!
In case you're wondering what this Ypos thing is about: it positions the water refraction camera (mirrored right below the users camera with an inverted x rotation) that creates the image which gets then the ripple effect applied to make the texture of the water surface.

I once followed this tutorial to make my own water effect (sreenshot attached), which wasn't that hard at all. There are a bunch of other not so hard tutorials for beginners which I found quite useful...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments
silken
20
Years of Service
User Offline
Joined: 13th May 2004
Location:
Posted: 19th Dec 2010 22:04 Edited at: 19th Dec 2010 22:08
Yes... or you can see the Evolved Shader Water in GDK adapted by Mista Wilson..


http://forum.thegamecreators.com/?m=forum_view&t=152491&b=22

else if you can Post a simple project for your water effect, we'll can try to see what's the Prob..
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 20th Dec 2010 00:11
Quote: "Well this if(Ypos>0) thing is completly useless, because you are doing the same in both cases!
In case you're wondering what this Ypos thing is about: it positions the water refraction camera (mirrored right below the users camera with an inverted x rotation) that creates the image which gets then the ripple effect applied to make the texture of the water surface."


Yeah... ahah, i converted it from dbpro source, and didnt saw what i actually was writing, until my last post. But really thanks for the link will take a look at it, that screenshot looks great!

@silken: Yeah but i really want to understand whats wrong, so i learn from the mistakes i do...

Anyway i will post a project later .

Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 20th Dec 2010 17:32


WTH?! I really start to hate this...

I meant now I added Mista Wilson his water shader into the project, and STILL!! It aint working... I really just copy pasted his code... You can check his code on his thread... It works with his projects.

I really dont get this...

Login to post a reply

Server time is: 2024-11-19 14:37:03
Your offset time is: 2024-11-19 14:37:03