I’m trying to port a Shader Toy example over to Babylon JS.
I’ve had a lot of success generally, but the ones that I fail with are where you have Buffer chaining AND the Buffer is used as an input to iteself
Example: Shader - Shadertoy BETA
- I attempted to make a simple copy of the above shader, but as you can see it doesn’t work. https://playground.babylonjs.com/#SSHURH#1 It is erroring with a reasonably self reference error.
glDrawElements: Source and destination textures of the draw are the same.
- I found an iOS Shader Toy render engine online that I use for guidance. Here’s the key part shadertoy-iOS-v2/ShaderInput.m at master · beautypi/shadertoy-iOS-v2 · GitHub
where the Shader is used as input to itself.
Questions: How in Babylon, can I use the output of a shader as input to itself? Do I have to write/copy to a different buffer each time?