Mask Pupil within Eye plane?
So basically I have 2 object planes. One with a material that has a cartoon eye on it, and another plane like a millimeter in front of it with a material for the iris/pupil of the eye. Both have alpha/transparency so they can be circles like eyes are, but on square planes. I plan to use the Texture Offset property in the inspector to control where the pupil is looking by moving around the texture within the plane. What I'm trying to do is basically mask or cut off the part of the pupil that goes off of the eye texture when the player looks down right or something like that taking into account the transparency of both textures, I've done a fair amount of research into DepthMasks but I can't find a good way to get the effect I want. Could anyone help me come up with a shader that can mask the iris when it clips out of the eye and into it's transparency?
Your answer
Follow this Question
Related Questions
Looking for help with creating a gold texture/reflection for mobile games 0 Answers
Textures, Materials, Meshs and Maps? 1 Answer
Changing ONLY certain part of 3D model's color 0 Answers
Handling Terrain layers at runtime 0 Answers
Reflection map (rm?) and Ambient Occlusion map (AO?) in Unity 0 Answers