# Replace texture coordinate “Reflection”

I'm working on an eye shader. It renders quickly, firefly-less and looks fairly good, but I hit a roadblock and could use some help here.

The eye uses a single sphere instead of being broken into into cornea, iris and pupil. I opted to avoid transparency or glass shaders to keep the noise down. The pupil is nothing but pure trickery.

The Reflection coordinate yields impressive results. The eye behaves as if the pupil were inside it. This method is superior than painting a black circle on the surface of the eye, as that would be glaring obvious from obtuse angles.

It's also an one trick pony, because the texture coordinate > Reflection output position is "fixed". It would be perfect if it were fixed relative to the object, but no, it seems to be anchored in the world. As soon I rotate my mesh it's gone, just as in the crow's right eye, where the pupil, always facing the same direction, is turned to the head inside.

How can I recreate this effect without taking the traditional route of modelling iris and pupil separately? I'm really pleased with how clean and fast this shader is. Is that possible to anchor the reflection in the object instead of the world? I tried to use vector transform with unsatisfactory results.

P.s.: This model is built on top of this one, I'm just improving it for my own needs. All credits should go to the original creator.

• The solution was to duplicate and separate the eyes from the mesh, parent them to the armature (so they'll be automatically duplicated when duplicating the crow) but replace their armature mod with two constraints: Track to the head's vertex group (it controls the gaze direction, I want it always straight), and Copy Location targeting the original eye vertex group (I left invisible eyes in the crow mesh for now, I'll replace it with a new selection straight from the head later). My issue was simply a rookie mistake from my part, thank you for your help in figuring it out! (2/2) – Rhaenys Jul 21 '17 at 19:46