Page 1 of 1

Custom shader texture input?

Posted: Wed Sep 09, 2020 6:12 pm
by julianlumia
Soo i have a shader question,
is it possible to use the output of a material as an input texture in the material editor?

To specify a bit further what I'm trying to achieve, I made a quick mockup in shadertoy:
https://www.shadertoy.com/view/tl2Bzd

I know how to convert the shader to a MM material, but I can't figure out how to reference a texture from another quad layer :(

So basically in the example line 7 on shadertoy:
vec4 col = texture(iChannel0, uv1);
I need to replace "iChannel0" with something referencing the texture of another MM material.

Anybody here know how to do this? Is something like this possible? :)

Re: Custom shader texture input?

Posted: Wed Sep 09, 2020 6:56 pm
by julianlumia
Welp never mind I solved it by looking at an example of how this was done in ISF shaders:)

Re: Custom shader texture input?

Posted: Fri Oct 23, 2020 8:52 pm
by jasonbeyers
With Madmapper 4.x, you can drag Materials into the "Generator" section of the media bin to instantiate a "Material Player" with that Material, with configurable resolution. When you do this, that Material player will show up in the texture input drop-down menu for other media (including other Materials or any ISFs).

This added step is not necessary if you just want to use an ISF as a texture input for something else.