- Home /
Two Animated Sprites fed into One Shader as Separate Textures?
So I'm new to Shaders, so apologies if this question isn't clear. I've created an animation clip with two Sprite properties (each from a separate game object) so that I have two animations running in parallel. One is a representation of the character, the other is a color map I want to use as a reference for the shader to determine what effects to apply to what portion of the character. I've written a Shader with two Texture2D properties: MainTex and ColorMap. MainTex correctly updates with the animation of whatever sprite renderer I attach the material to, but I'm struggling to find a way of assigning the second animation to the second texture.
The closest I've come is a script that gets the sprite of the other game object every frame and assigns its texture to ColorMap, but I imagine there's a better way of doing this? Thanks!
Your answer

Follow this Question
Related Questions
Unity 2D Shader Graph Sprite transparent when in shadow 0 Answers
Render a sprite only when it's on the parent but not other sprites. 0 Answers
grayscale shader on iOS turns black 1 Answer
How to fix this kind of shader error? 0 Answers
Can I map a 2nd texture onto a sprite that's already mapped with an atlas? 0 Answers