Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411498 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 08:24:26 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Sea shader with 187 lines of code in webgl...
Pages: [1]
Print
Author Topic: Sea shader with 187 lines of code in webgl...  (Read 1090 times)
Impmaster
Level 10
*****


Scary, isn't it?


View Profile WWW
« on: March 02, 2015, 10:08:35 PM »

https://www.shadertoy.com/view/Ms2SD1

Do you guys look at this and think, wow, this code is genius or do you think holy shit i dont understand this at all?
Logged

Do I need a signature? Wait, now that I have a Twitter I do: https://twitter.com/theimpmaster
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #1 on: March 02, 2015, 10:46:06 PM »

All I see is a SSL certificate related problem with loading the site.
Logged
darklight
Level 0
***



View Profile WWW
« Reply #2 on: March 02, 2015, 11:07:37 PM »

I see a nice slideshow, but I've seen this before and it looks A-M-A-Z-I-N-G.  I understand almost nothing, and yet I need to implement something like this in my XNA game somehow.
Logged

Storm Clouds over the Western Front - forum & dev blog | Twitter: @DarklightXNA | YouTube: 2D Flight Sim
Impmaster
Level 10
*****


Scary, isn't it?


View Profile WWW
« Reply #3 on: March 02, 2015, 11:16:53 PM »

Is this code comprehensible to anyone who knows how to make shaders, or is it just genius, was my real question.
Logged

Do I need a signature? Wait, now that I have a Twitter I do: https://twitter.com/theimpmaster
Boreal
Level 6
*


Reinventing the wheel


View Profile
« Reply #4 on: March 03, 2015, 12:42:53 AM »

In the real world the bulk of this shader would be split between the tessellation and fragment shaders, not done as one big raycasting fragment shader.

It's pretty simple when you break it down, actually.  One chunk for handling the waves through a hybrid of a Fourier series and Perlin noise, and another chunk for evaluating color through Fresnel.  It says it does subsurface scattering in the description but I can't find any evidence of that in the source.

Crashes my video driver after a minute or so on top of that.
Logged

"In software, the only numbers of significance are 0, 1, and N." - Josh Barczak

magma - Reconstructed Mantle API
Quarry
Level 10
*****


View Profile
« Reply #5 on: March 03, 2015, 12:45:39 AM »

Shader programmers, demoscene guys and assembly hackers are the only real wizards
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #6 on: March 03, 2015, 02:52:32 AM »

And when you put them together... (I was going to link to the video in the description too but it seems it was taken down =/)

Disclaimer: I'm in the same demogroup as the guy who made that
Logged
Polly
Level 6
*



View Profile
« Reply #7 on: March 03, 2015, 03:30:23 AM »

Is this code comprehensible to anyone who knows how to make shaders, or is it just genius, was my real question.

It's pretty straight-forward to be honest. But as mentioned, in the real world you wouldn't do all this in the fragment shader .. that's just the ( fun ) limitation that Shadertoy imposes Wink
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic