Previous topicNext topic

Shadertoy Conversion Help

Questions, comments, feedback, etc.
Post Reply
sjdacruz
Posts: 37
Joined: Sat May 30, 2020 4:53 am

Shadertoy Conversion Help

Post 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
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy Conversion Help

Post 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
sjdacruz
Posts: 37
Joined: Sat May 30, 2020 4:53 am

Re: Shadertoy Conversion Help

Post 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?
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy Conversion Help

Post 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?
cphollis
Posts: 1
Joined: Tue Dec 28, 2021 7:26 pm

Re: Shadertoy Conversion Help

Post 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!
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy Conversion Help

Post 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.
Post Reply