Porting ShaderToy GLSL "Finite Water"

Having lots of fun with Finite Water on ShaderToy!

I am trying to port it to Vuo, however there are 2 buffers. To deal with this I simply made copies of ShaderToy, (Buffer A & Buffer B).

However there seems to be an alpha issue with the buffers, I am able to write to the buffer but then not delete material from it.

Composition attached.


Working ShaderToy:

Not working Vuo:

ScreenShot Composition:

Finite Water_PORT.vuo (4.84 KB)

Screen Shot 2016-02-15 at 6.15.28 pm.png

The issue is color depth. Currently, the Make Image with Shadertoy renders at 8bpc, which is 8-bit unsigned numbers. But your shader is outputting negative colors — they get clamped to 0.

In Vuo 1.3, we’ll add an input port for color depth with the option to switch to 16bpc, which is 16-bit signed numbers.

In the meantime, you could rework the math in the shader to output colors as non-negative numbers.

Cheers Jaymie!! Great to hear that shader toy node will get 16bpc. I probably could also turn the code into a custom node and thus use 16 bit that way?

Yes indeed.

We added the input port for color depth in Vuo 1.2.2.

Can anyone confirm if the latest version can handle 16bpc - and that it can properly replicate shadertoys with 16 bit buffers?

@glennmarshall, confirmed. I took @alexmitchellmus’s composition from above, simplified it for testing (notably, removed mouse input), and changed the Color Depth inputs on the Shadertoy nodes to 16bpc. The composition successfully outputs ripples, as opposed to the white blobs before the 16bpc option was added in Vuo 1.2.2. I changed a couple of constants that @alexmitchellmus had modified back to the values in the original Shadertoy code. Now the Vuo composition output appears to match the Shadertoy demo. Composition attached.

Finite Water_PORT_2016-08-01.vuo (4.48 KB)

1 Like

But please be aware that we have not yet updated ShaderToy node to use the new ShaderToy syntax. When porting code from the Shadertoy site, you’ll have to manually change it back to the older syntax.

Thanks Jaymie!!
I got that working in the trial version of Vuo. Brilliant!
I’m currently trying to import another multi pass shader from Shadertoy - but I’m having a little problem with it - I’ve posted a question here…

If I can solve that, then I’ll definitely be buying Vuo for my project.
Hope you can help,