Jump to content

Need help creating ocean shader


max123
 Share

Recommended Posts

Hi,

I'm trying to reproduce ocean shader like this one: https://jbouny.github.io/fft-ocean/#day
I know we have waterMaterial in Babylon (which is gorgeous!) but not quite what I'm after: it only works with windForce/windDirection which looks like you're constantly moving or as if water is constantly flowing.

I've tried to use shader which you can find at https://github.com/jbouny/fft-ocean but it's just waaaay over my head!
First of all, I can't figure out how to split it into vertex/fragment shaders to use in Babylon.

Any shader/GLSL gurus out there, any help hugely appreciated!

Link to comment
Share on other sites

4 hours ago, NasimiAsl said:

Task is beginning 

http://www.babylonjs-playground.com/#DU61I8#8

try find wave correct formula 

Dude, this looks great! I'd say if you add some x/z movement, it would make a perfect shader for a brook or a fast river as it is and should become part of bjs custom shaders!
For ocean/sea algorithm, try searching FFT (Fast Fourier Transorm).

Link to comment
Share on other sites

i think Full FFT is so heavy for general so maybe we need some changes   maybe we need make too version some full quality and some usable shader 

and i don't work on height map algorithm  now just i wanna find solution for have 60 fps

if you can make shader function  ( vec3 and time and calculate height  ) that can be help too 

Link to comment
Share on other sites

  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...