Ad: If you want third-party program development, plug-in development, Unity special effects production, you can contact us to provide professional outsourcing services. Contact email: appstools.net@outlook.com

how to use?

Eye Programming Document description

Are you still looking for nice cartoon eyes? Then Eye Programming is very suitable for you, highly customizable, and supports textures. Cartoon, real can be.

Let’s take a look at some demos:



How to do it? very simple!

For getting started, it is very simple, just create a new shader, and then add the shader to the shader: Eye Programming.shader.
Create a sphere that comes with Unity in the scene. Assign the shader to the sphere. Well, you can see the following picture.

We provide some adjustable parameters:

The following is the meaning of each parameter:

_Color (“Color”, Color) = (1,1,1,1) //Main color
_Smoothness(“Smoothness”, Range(0, 1)) = 1 //Smoothness
_IrisTex(“Iris Texture (RGB)”, 2D) = “black” {} //Iris texture
_IrisTexColor(“Iris Texture Tint”, Color) = (1,0,0,1) //Iris additional color
_Radius(“Iris Radius”, Range(0,1)) = 0.4 //The size of the iris
_IrisColor(“Iris Color”, Color) = (0,1,1,1) //Iris color
_IrisColorOut(“Iris Color Out”, Color) = (0,1,0,1) //Outer iris color
_IrisScaleX(“Iris Scale X”, Range(0,2)) = 1 //iris scale x
_IrisScaleY(“Iris Scale Y”, Range(0,2)) = 1 //iris scale y
_Speed(“Iris Scroll Speed”, Range(-10,10)) = 0 //Iris scroll speed
_Scale(“Iris Texture Scale”, Range(0.1,10)) = 10 //Iris texture scale
[Toggle(TEXTURE)] _TEXTURE(“Circlular Texture”, Float) = 0 //Whether it is a circular texture
_Distort(“Iris Texture Distortion”, Range(0,1)) = 0.5 //Iris texture distortion
_Brightness(“Iris Texture Brigthness”, Range(0,5)) = 1 //Iris texture brightness
_PupilTex(“Pupil Texture (RGB)”, 2D) = “white” {} //Pupil texture
_PupilScale(“Pupil Tex Radius”, Range(0,1)) = 0.3 //The radius of pupil texture
_RadiusPupil(“Pupil Radius”, Range(0,0.5)) = 0.1 //Pupil radius
_PupilColor(“Pupil Color”, Color) = (0,0,0,1) //Pupil color
_PupilColorOut(“Pupil Color Out”, Color) = (0,0,1,1) //Pupil color
_PupilScaleX(“Pupil Scale X”, Range(0,1)) = 0.5 //Pupil scale x
_PupilScaleY(“Pupil Scale Y”, Range(0,1)) = 0.5 //Pupil scale y
_GlintTex(“Glint Texture (RGB)”, 2D) = “black” {} //High light texture
_GlintScale(“Glint Scale”, Range(0,1)) = 0.3 //Highlight zoom value
_Edgewidth(“Iris Edge Width”, Range(0,2)) = 0.1 //pupil edge width
_IrisEdgeColor(“Iris Edge Color”, Color) = (0,0,0,1) //Pupil edge color

Okay, that’s the end of the tutorial. Use your imagination!

文档更新时间: 2021-05-11 16:06   作者:admin