I was checking the forums but no answers to the following question: How do I add to Magic an iChannel0 texture external image?
I was trying to get this shader to work in Magic: https://www.shadertoy.com/view/XsfGzH
I used an image (512px and 1024px noise png) as an input to the GLSL module, and not even close to the expected result.
Would you please let me know what should I do.
iChannel0 texture external image
Re: iChannel0 texture external image
Good question. In general, you just have to connect an Image module to the GLSLShader module, as you said. Like this:
But, the problem with some shaders on Shadertoy.com is that they don't use the images directly, but rather as a shortcut for other computations. In the example you provided, he is using iChannel0 as part of a noise function. I don't think there's a way to download images from Shadertoy.com, so his function can't be duplicated exactly. To come close, you'd have to create the image yourself (using Photoshop, etc.). But I'm not sure it's possible since his function is so specific. I tried it myself and I couldn't get it to work . Sorry about that.Re: iChannel0 texture external image
Hi Eric,
Thanks for your post. I was playing a little bit with some images I did in photoshop and I am getting some results in some of the shadertoy.com shaders, but for this specific shader I can´t get anything close. I am learning a little bit of noise functions in glsl to generate the noise via function instead of images. I'll keep you posted. Cheers.
Thanks for your post. I was playing a little bit with some images I did in photoshop and I am getting some results in some of the shadertoy.com shaders, but for this specific shader I can´t get anything close. I am learning a little bit of noise functions in glsl to generate the noise via function instead of images. I'll keep you posted. Cheers.
Re: iChannel0 texture external image
here is a mirror of all the shadertoy textures (and cubemaps).
http://shinythings.tv/shadertoy%20textures.zip
http://shinythings.tv/shadertoy%20textures.zip
Re: iChannel0 texture external image
Hi, how do you use these textures?
Re: iChannel0 texture external image
Most of the time it's pretty simple, as I explained above. Just load a texture into an Image module, and connect it as an input to the GLSLShader module.
But, one important thing to understand is that all modules use the entire Magic window as input, even if an image only covers some of the window. In other words, this: ...is different than this: And, shaders that use texture images as noise functions often assume the entire window is the texture, like the second image.
So the bottom line is that you'll get different results depending on the image's aspect ratio.
That might be a little confusing, so let me know if you have any questions.
But, one important thing to understand is that all modules use the entire Magic window as input, even if an image only covers some of the window. In other words, this: ...is different than this: And, shaders that use texture images as noise functions often assume the entire window is the texture, like the second image.
So the bottom line is that you'll get different results depending on the image's aspect ratio.
That might be a little confusing, so let me know if you have any questions.
Re: iChannel0 texture external image
Great, thanks! How did you get this?Syd wrote:here is a mirror of all the shadertoy textures (and cubemaps).
http://shinythings.tv/shadertoy%20textures.zip
Re: iChannel0 texture external image
browser tools network monitor to catch the http request, then pulled them all down individuallyEric wrote:Great, thanks! How did you get this?Syd wrote:here is a mirror of all the shadertoy textures (and cubemaps).
http://shinythings.tv/shadertoy%20textures.zip
still doesn't really help much if the sampler only has access to the full window though. Could we perhaps have a experimental shader plugin with 4x samplers from file input instead? the video library you use also does a pretty good job of opening images, so perhaps you could hit two birds with one stone there. Maybe expose the unscaled textures with some new variables so they (the fragment shaders) could be easily ported but not break backwards compatibility in magic?
Re: iChannel0 texture external image
It's a possibility. I'll need to have a good think about it though, because it's tricky.Maybe expose the unscaled textures with some new variables so they (the fragment shaders) could be easily ported but not break backwards compatibility in magic?
-
- Posts: 1
- Joined: Sat Apr 29, 2017 10:48 pm
Re: iChannel0 texture external image
@Syd is it possible to acquire the more recent textures that have been added, specifically the ASCII Font 1 by Otaviogood? Would help me with a project. Not sure anywhere else to find this. Thanks!
Re: iChannel0 texture external image
Try this: https://www.shadertoy.com/media/a/08b42 ... b31560.pngis it possible to acquire the more recent textures that have been added, specifically the ASCII Font 1 by Otaviogood? Would help me with a project. Not sure anywhere else to find this. Thanks!