1. The bottle supports the adjustment of eye highlight, ordinary highlight, edge light, and the intensity, range and size can be adjusted
  2. Compatible with Unity’s own lighting system
  3. The depth of the liquid inside the bottle can be changed
  4. The width of the liquid excess, the color of the liquid cross section, and the color of the liquid can be changed
  5. The liquid can be swayed and the amplitude of the sway can be controlled
  6. Liquid supports edge color adjustment, edge width and intensity adjustment
  7. Out of the box, it can be used easily without complicated settings, and the directory structure is clean and refreshing.

Demo scene needs the support of Unity official screen post plug-in “Post Processing”

Note: The current version needs to turn on anti-aliasing to display normally. The developer is working on this issue. We will update the version soon.

We provide a Demo scene, which is very simple and only contains the necessary content. You can refer to Demo for setting.

how to use? Including 3 parts, we will introduce in detail next

  1. Create a new shader, specify Shader: “AppsTools/Toon Swaying Water Glass/Glass”, and then assign this shader to your bottle (something similar to glass)

  2. Create another shader, specify Shader: “AppsTools/Toon Swaying Water Glass/Liquid”, and assign this shader to the liquid mesh in your bottle.

  3. Assign the formation “Swaying.cs” to the GameObject of your liquid mesh, Swaying will automatically find the MeshRenderer, and then perform the swaying performance at runtime

The following is a description of Shader parameters:

About the parameter description of Glass.shader:

Main Color: The main color determines how the bottle is colored
Specular Color: Specular color, mainly affected by light
Specular Size: Specular size
Specular Offset: Specular offset information
Specular Intensity: Specular intensity information
Eye Specular: the highlight color of the eye
Eye Specular Intensity: Specular intensity information facing the eye
Outer Luminous Color: Edge light color
Outer Luminous Intensity: Edge light intensity
Outer Luminous Color CutOff: Edge light cutoff information
Fresnel Outside Color: Fresnel Outside Color
Fresnel Outside Color Intensity: intensity information
Fresnel Outside Color Cutof: blocking information

The following is the attribute description of Liquid.shader:

Color: main color information
Texture: part of the texture information can be displayed, the default may not be specified
Weights: weight information, which determines the height of the liquid
Section Color: Section Color is used to determine how to add color to the section
Edge color: excessive edge light color
Edge width: the width of the transition edge
Edge Light Color: Edge light color
Edge Light Weight: edge light weight information

thanks for watching

Author:admin  Create time:2021-06-14 09:27
Last editor:admin  Update time:2021-06-14 09:34