Page 1 of 1

Shadertoy Conversion Help

Posted: Sat May 30, 2020 4:57 am
by sjdacruz
I've had luck pulling shadertoys into .glsl files and loading them into Magic. However, when I encounter a toy that has multiple "buffers" and layers, I'm not sure how to write that into one single shader file. My example would be this following toy: (how do I get this into a file for GLSLShader to interpret it?)

https://www.shadertoy.com/view/MsGSRd

Thanks,
Scott

Re: Shadertoy Conversion Help

Posted: Sat May 30, 2020 3:07 pm
by Magic
The GLSLShader module doesn't support those features. You will have to convert to ISF. Your best bet is the official ISF Editor, which can pull from Shadertoy: https://docs.vidvox.net/freebies_isf_editor.html

Re: Shadertoy Conversion Help

Posted: Sat May 30, 2020 5:08 pm
by sjdacruz
Thanks! I looked into it, and have successfully converted some shadertoys, however I'm having difficulty with the syntax to point to an incoming media source. It seems that "iChannel0' is not defined when ported over. When I correct it, it creates an ISF that is output only.

Is there any literature, or guides on how to correct these parameters, since it's outside the realm of Magic's native functionality?

Re: Shadertoy Conversion Help

Posted: Mon Jun 01, 2020 7:40 pm
by Magic
For an ISF module to have an input in Magic, it needs to have something like the following:

Code: Select all

	"INPUTS": [
		{
			"NAME": "inputImage",
			"TYPE": "image"
		},
Does that help?

Re: Shadertoy Conversion Help

Posted: Tue Dec 28, 2021 7:34 pm
by cphollis
Hi Eric -- I'm very much enjoying exploring MMV, to the point of ordering a serious graphics machine. I've had good luck importing shadertoys via the ISF Desktop Editor, but -- like above -- I am having difficulty figuring out how to link audio from the input window to the visualizer code that's expecting audio input.

What exactly should "NAME" and "TYPE" be as above in order to feed a shadertoy expected audio input?

Thanks in advance!

Re: Shadertoy Conversion Help

Posted: Thu Dec 30, 2021 6:10 pm
by Magic
You shouldn't need to change any code. What you need to do is use the AudioToImage module, which "converts" audio data into image data that ISF modules can use. This will work with any ISF module that takes an image input.