ShaderToy Seascape
来源:互联网 发布:中国留学生 欧洲 数据 编辑:程序博客网 时间:2024/05/16 23:55
https://www.shadertoy.com/view/Ms2SD1
Shadertoy
Shadertoy
Browse Live New Shader Sign In
Seascape
Tags: procedural, noise, waves, sea,water, subsurface
159950 369 0
Uploaded by TDM in 2014-Sep-27
fully-procedural sea surface computing. without textures.
Android version: https://play.google.com/store/apps/details?id=com.nature.seascape
Android version: https://play.google.com/store/apps/details?id=com.nature.seascape
uniform vec3 iResolution; // viewport resolution (in pixels)uniform float iGlobalTime; // shader playback time (in seconds)uniform float iChannelTime[4]; // channel playback time (in seconds)uniform vec3 iChannelResolution[4]; // channel resolution (in pixels)uniform vec4 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: clickuniform samplerXX iChannel0..3; // input channel. XX = 2D/Cubeuniform vec4 iDate; // (year, month, day, time in seconds)uniform float iSampleRate; // sound sample rate (i.e., 44100)
3741 chars
<div class="uiButton" title="Go full screen (+
The ITER variable needs to be a constant at compile time, so passing a variable gives an error (GTX 680) on line 98.
It looks great setting the loop to a straight 5 though.
yep, thank you!
Looks great TDM. Love the water color! You could also add a bit of fog towards the horizon to make the transition between the water and the sky smoother
poljere, thanks! you can uncomment line 172 to enable fog.
Hello again! I have a tip for cheap anti-aliasing, if you want it.
Pass the distance to the surface to the getNormal function like:
And use the second parameter passed as the epsilon in the normal function.
This smooths distant details and prevents the shimmering pixel effect.
yeah, good idea. also, we can get squared length by dot(dist,dist).
So true!
Incredible I love it. This is so damn impressive.
Best water Ive seen
Amazing!
awesome!
Whooooww!! *drool* No shit: This makes me wanna goto the sea!! I need vacation! :|
The colors and static looks are almost perfect. But after looking at it for a while.. the waves move kind of linear. I miss this bouncing feel they usually have.
Awesome!
Genius work! AWESOME!
Amazing best water ever seen, how long did you take to program it ?
a few days, but i've working on water rendering before.
This is absolutely amazing. Awesome work!
There is some strange white noise in the first few seconds on my computer, but obviously this is incredible water it looks fantastic!
Awesome !!
Killer.
This is one of the best CGI things I have ever seen. Simply beautiful.
Looks amazing!
This is ******* amazing! A masterpiece in 185 lines of code.
Finally got around to reading the code. That technique for heightmap intersection is great, is it your own work?
it's interpolation search, very fast on linear increasing values (such as distance field). code is mine, algorithm is common.
I see, and it suffers from the same problem as other interval based methods, that is not being able to predict which root it will converge to. But for cases when you (mostly) have only one possible root, like here, this is great.
true
registered account to say it's amazing work
I think you might have found the shader that god is running on the actual ocean.
Is there any cards on the market that can run these demos in fullscreen at 60fps ?
My GTX-680 runs this full-screen at 60fps, so I'm sure there are many many more cards that will:-
http://www.videocardbenchmark.net/high_end_gpus.html
Insane work! Any chance of an article to explain the finer points of how it works? Cheers!
wow this is really impressive !!!
This make me wonder if the entire universe is a shader program.
now you can try android version of it (as gpu benchmark):
https://play.google.com/store/apps/details?id=com.nature.seascape
I'm trying to use this as water plane in my game, or perhaps a sky box eventually.
Could you help me with passing correctly the THREE js camera position as "ori" and angle as "ang" in this JSBin: http://jsbin.com/reqali/edit?html,js,output , so that the mouse camera controls work correctly? Currently I have just set a fixed top-down perspective on a plane in my game, but it would be cool to map the shader with correct perspective, perhaps even to a sky box.
I play Box of Rain when viewing.
https://www.youtube.com/watch?v=b-z7uN9OjyI
reeeeally amaaaaaazing
This is Awesome. The AntiAliasing tip D Hoskins made. Would make this perfect!