stevensona/shader-toy

how to deal with multipass shadertoy?

Closed this issue · 3 comments

like this one:
https://www.shadertoy.com/view/4ttSWf
how to transplant the multipass shdertoy code to vsc using your plugin, can you make a demo, thanks!

Right now, this extension does not support multipass shaders.

also I refer you to interactiveshaderformat.com spec and git, they have a great method implemented to deal with this.

@neargray Do you reckon the features we got right now are enough? To use multipass you will have to save each pass as a separate file. I'll shortly explain here how to use them:
To load any other shader as an input into your shader use the same syntax as for loading textures, but use the buf:// "protocol, like so:
#iChannel0 buf://./first-pass.glsl
Then sample from iChannel0 as you would any other texture. Conveniently, and different from shadertoy.com, you can preview any part of your multipass independently by just opening the different editors. You may also feed a shader back into itself by specifying
#iChannel0 buf://self
Now when sampling iChannel0 you will receive the last rendered frame.

Unless you are missing anything I will close this in a couple of days.