- Home /
Chaining Multiple Shaders Together
Hi, this is probably a really stupid issue, but I just don't know how to do it
I have shader A: This one does pixel lit sprite shading. It's a cs file that just includes a ton of cgcinc files then I have shader B: I wrote this shader, and it creates a disintegration effect.
I wanted to make shader C, a modified version of shader A that does what shader B does, but I couldn't for the life of me work out how the shader worked or was structures
Can I chain the two shaders together? So normally, in the frag pass of shader B, I'd do a tex2D on the _MainTex to get the colour of the sprite at that fragment. Could I somehow chain it so instead of getting the raw colour, it gets the output of shader A? (i.e the colour of that fragment + all the lighting) that way I could use the output of shader A in shader B
Your answer
![](https://koobas.hobune.stream/wayback/20220612164315im_/https://answers.unity.com/themes/thub/images/avi.jpg)