Shadertoy2Processing icon indicating copy to clipboard operation
Shadertoy2Processing copied to clipboard

Thank You For These

Open everythingability opened this issue 4 years ago • 2 comments

Fabulous work! I know nothing about .glsl coding, but in the past often have managed to hack them until they work with Processing, but this makes so many more shaders available to try.

I have a question regarding, let's say a shader like this one, https://www.shadertoy.com/view/Wttczj , where there are multiple buffers. Do I just copy Buffer A, Buffer B and Image into the ...

// ------------------------------ // SHADERTOY CODE BEGINS HERE - // ------------------------------

...area? Does ordering matter? I often get the error...

ERROR: 0:109: Function 'mainImage' redefines an existing function (which I assume is the one higher up the glsl file, but when I remove it, it doesn't fix it.

I don't need you to fix my rubbish code, but what's the "loose theory" behind adapting ShaderToy shaders, I may still be able to hack it into existence.

Once again, thank you.

everythingability avatar Aug 13 '21 09:08 everythingability

@everythingability I submitted an example of using multibuffer shadertoy shaders here, they require extra setup:

https://github.com/SableRaf/Shadertoy2Processing/blob/master/examples/reactionDiffusion2Pass/reactionDiffusion2Pass.pde

Good luck

morisil avatar Aug 13 '21 11:08 morisil

@morisil Perfect, thank you.

p.s So each buffer needs its own PGraphics buffer... I see!

everythingability avatar Aug 13 '21 11:08 everythingability