I am trying to create a flat 2D looking eye in Maya using flat geometry layered on top of each other. The three layers are the white of the eye, the iris and the pupil. I have attached two images showing the final result I am trying to achieve.
When I have the iris and pupil geometry travel beyond the edge of the white of the eye, like a character is looking to the sides or up and down, I would like it so they are masked out and you do not see the geometry going beyond the border of the white of the eye. I have uploaded a couple of images to show what I am talking about if it is not clear.
I have tried parenting the pupil to the iris and then using boolean -> Difference -> and using intersection classification as normal, but it breaks apart my parent constraint system and I cannot get it to work the way I want.
I was hoping that there might be either a shader that I could apply to the white of the eye that makes any layers on top of it masked out when it travels outside of the white, or another to mask out that geometry.
Thanks so much!!