We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi Although I've had a lot of success porting shadertoy shaders into processing, I'm getting problems with the new multi pass shaders. I've worked out how to create multiple passes in Processing using PGraphics buffers. But the end results look wrong. Here's an example.. http://imgur.com/a/065EU
It looks like something to do with how the colours are being blended / calculated. Maybe it's a premultiplied alpha thing, I've no idea. Because I'm only having these problems with multi pass shaders - I'm thinking it might have something to do with how Processing is passing in / reading out data from buffers - which might be different from how shadertoy / WebGL does it.
Here's the 2 shaders in question..
https://www.shadertoy.com/view/MstSWX
https://www.shadertoy.com/view/MlcGWH
Many thanks for any clues as to what the problem could be, Glenn.
Answers
I'm not sure I can help, but maybe you could also share your Processing versions to be able to tweak them and find the issue.
Thanks for replying. I think it has to do with Processing only being able to have 8 bit PGraphics buffers. Shadertoy uses 16 bit buffers.
Here's the sketch (just the first render pass of 'liquid xenopmorph' from the test pic in original post)
And here's xenopassone.glsl