How to deal with the more complex Shadertoy shaders?
Asked Answered
H

3

0

If we take as an example the following Shadertoy shader we can see that it is made of 3 different files, namely Buffer A, Buffer B, and Image. How would I create something similar in Godot. Do I need to use Sampler2D. If yes, how can I have multiple Sampler2D objects that point at different things? (I made a shader where I use an image texture, but I half understand it for the moment so I am not sure.)

How can I deal with iFrame?

Lastly, in Shadertoy, iChannel0/1/2s are used for a number of things, like sound, images and so on (e.g. line 177 of Buffer B on the shader). Does this fall under my first question, namely just use Sampler2D? In some cases Buffer A/B/C/D are loaded into the iChannels and I am not sure what they are.

Thanks.

Hulbig answered 19/3, 2021 at 7:6 Comment(0)
M
0

Those are texture buffers/samplers.

You should probably go through this page: https://docs.godotengine.org/en/stable/tutorials/shading/migrating_to_godot_shader_language.html

Micaelamicah answered 19/3, 2021 at 7:7 Comment(0)
S
0

AFAICT shadertoy buffers let you do multiple passes - this is IIRC not possible in Godot.

Stomy answered 27/9, 2021 at 9:4 Comment(0)
M
0

Well, to a degree you can render into a viewport then do something to that data in the viewport and output to a 2D canvas object.

Micaelamicah answered 27/9, 2021 at 21:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.