max123

Need help creating ocean shader

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!

Share this post


Link to post
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).

Share this post


Link to post
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 

Share this post


Link to post
Share on other sites
On 10/10/2017 at 11:21 AM, Luaacro said:

Yes I am!

just takes so much time to understand everything and have something robuts :)

Well do keep us updated - this would make a great addition to Babylon's Shader library!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.