The Cylinder topology assumes the container is closed, so it will automatically work as if the glass was closed on top. In this case a Cylinder topology could work better than Irregular topology. In the second glass, the Irregular topology uses the mesh itself to define the initial and end position of each volumetric ray. Since there’s no mesh on top of glass, the ray on the top edge starts in the interior of the glass instead of the top, producing the clipping in the image.
Another common solution to non-capped containers consists of putting a liquid volume with a cylinder topology inside your cup or open container. Set the detail setting to “Default No Flask” which will render just the liquid and it will work. Check out demo scene “NonCapped” for an example.
– Refraction Blur: when you enable this option, a CommandBuffer is attached to the main camera and a full screen blur is performed to produce the effect. Obviously this can add some performance penalty in mobile.
– Irregular Topology: this is the most complex topology for the shader. It involves another CommandBuffer which renders the geometry back faces to perform the ray-tracing. If you need more performance you may want to try the Cylinder topology instead.
– Depth Aware: enabling this option will make the fragment shader to check the Camera Depth Buffer. Disabling this option will save a texture fetch.
– LiquidVolumeDefault.shader: default style.
– LiquidVolumeDefaultNoFlask.shader: default with no flask style.
– LiquidVolumeBump.shader: texture/bump style.
– LiquidVolumeReflections: reflections style.
– LiquidVolumeSimple: simple style.
– LiquidVolumeSmoke: only smoke style.
– LiquidVolumeMultiple: allows several layers of liquid.
– LiquidVolumeMultipleNoFlask: several layers without flask.
In addition to remove unnecessary shaders, you can edit the shaders and reduce some features. Look for these lines in the shader files:
#pragma multi_compile __ LIQUID_VOLUME_DEPTH_AWARE Comment out the above line if you won’t use Depth Aware option in your build.
#pragma multi_compile __ LIQUID_VOLUME_DEPTH_AWARE_PASS Comment out the above line if you won’t use Parent Aware option in your build.
Expand the Shader Features section in Liquid Volume section. You’ll find additional options to fine tune the shader and locate the shades in your project.