[Released] RealEyes Unity eye shader

RealEyes is a solution for quality eyes in Unity. I have designed this specialized shader to be similar to how Valve in Crytek do their eyes.

FEATURES

  • Iris tint in shader: set the eyes to be any color you would like.
  • Pupil Dilation: set the pupil size in the shader, or use the included AutoDilate script to do it for you based on the light level.
  • Eye depth effect using advanced parallax occlusion.
  • Raised cornia with reflection and specularity.
  • Can render in one draw call! Multiple eyes can be dynamically batched.
  • Works in DX9, DX11, and OGL ES 2.0. PS 2.0 fallback shader included.
  • Lookat controller with rotational limiting is included.

See the web demo here!

Asset store link

An update was just released for this that fixes the fallback shader not falling back on unsupported hardware.

I am now working on an update that will have the eyes move by changing the uv’s rather than the rotating the transform. This will also allow me to add an ambient occlusion texture to “ground” the eyes into the socket and give them a more natural look.

New update - The main shader now works with OpenGL, so Mac users can now see it!

Hi there!
Realy good shader but have one trouble. I see shadows behind character in his eyes in deferred way.

I’m not quite sure that I understand. Do you mean that the eyes are casting shadows? You can disable that in the gameobject of the eyes. There should be a Cast Shadows and Receive Shadows checkbox.

Im using deferred lighting mode on my camera, object that stay behind eyes cast shadow. And this shadow draws on eyes.

Do you have any ideas about this?

After testing this more in deferred rendering with shadows, I see what the problem is. Fortunately, it’s an easy fix and I will submit a new package with the fix to the asset store ASAP. Thank you for reporting this bug.

Its my pleasure. Thx for quick reply.

do you plan to add support for reflections probes in unity5?

Yes, I will look into adding reflection probes. Doesn’t sound too hard to add, if it’s anything like the existing light probes.