Advanced Ocean Shader Demo (version2)

I was tinkering with Cube Maps and found a displacement vertex shader in my old Blender demo archives… and i had an idea to use it to make ocean waves. Im impressed by the speed of the vertex shader, with all the textures and stuff it runs ~400 fps.

There could be problems running this on ATI cards due fresnel thing… so ill try to figure out how to fake the effect.


and a blend.


Version 2

Mouse - look
WASD - move
up/down arrowkeys - change big wave height
mousewheel up/down - change small wave height
left/right arrowkeys - change foam amount
1- ssao only
2- +ssao
3- cromatic aberration
4- bloom

Download blend

Optimized demo:






Dam I can’t see it, got a ATI card :\

Looks awesome!

I still don’t get it!!! Why does it run so fast? Martinsh! You ARE AWOESOME!!! You are an inspiration for me !!
I’ll use this, defenetly, does it work on spheres?

Yes! It Works on spheres!!! I’ll finally be able to add more realistic oceans!!!

Wow! Looks awesome!

I can’t get the max fps, due to my graphics card not playing nice or something, but I still cap at 100fps!

OS: Windows 7 Beta

Also, file uploading sites can be annoying, especially for a quick blend post. That’s why now has a .blend uploader:

How do you get such fps? I’m stuck at 60 fps, I’m using the standard version obviously.

and he did it again :stuck_out_tongue: !

Absolutely amazing!

It seems to work for me but for some reason I only get 1.217 fps :frowning:

OS: Windows XP Home edition 2002 SP2
GPU: Geforce 7900 GS

75fps for me and thats only because its locked to the monitor frequency…

Absolutley awsome!

XP pro Intel E8400 3GHz, 4GB ram, Nvidia 8600 GT

looks very cool :slight_smile: but on my 7600 gt (linux) is extremly slow only 1.5 fps :frowning:

and some info form terminal

---- Vertex Shader Error ----
0(38) : warning C7011: implicit cast from “int” to “float”
0(38) : warning C7011: implicit cast from “int” to “float”
0(38) : warning C7011: implicit cast from “int” to “float”
0(38) : warning C7011: implicit cast from “int” to “float”
0(38) : warning C7011: implicit cast from “int” to “float”

---- Fragment Shader Error ----
0(17) : warning C7011: implicit cast from “int” to “float”

Hey thanks Moguri! ill keep the site bookmarked :slight_smile:
I wish the Blenderartists forums allowed blend attachments little bigger than 976.6 KB.
3MB would be fine.
here you go:

Yea i got same errors… it still works though. :slight_smile:

Edir: To see actual framerate, you have to disable V-Sync for Blender in NVIDIA Control Panel (dont know how to do it for ATI cards) and enable “Enable All Frames” in Blender.

Sadly only 2 fps for me

Win XP 32 bit sp 3
Xeon 3ghz and 3.25 gb of ram
Nvidia Quadro FX 550

Not working on Ati9600xt - Solid white ocean…

That’s incredible. It looks real.

Wicked sick :slight_smile: Now I can finally see my true fps :slight_smile: Runs steady at 90 frames over here, but I get these weird artifacts .( Little white lines and dots. Are these the vertex shader errors?

Looks very nice, but I guess I just found the limits of my GPU. :frowning:

NVIDIA GeForce Go 7600, 1.2 fps

Wait what?! Then there is something wrong with your system… You should get atleast 20+ frames :frowning: I’ll check around see what I can dig up for you :wink:

Edit: I think you should get about 10 frames…hmm… I’ll check some more :slight_smile: