Quantcast
Channel: Questions in topic: "hlsl"
Viewing all articles
Browse latest Browse all 206

Chaining Multiple Shaders Together

$
0
0
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

Viewing all articles
Browse latest Browse all 206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>