Class Liquid

java.lang.Object
com.codename1.gpu.shaders.Liquid

public final class Liquid extends Object
Glowing and moving liquids, and the light water throws on what lies under it. Use with Material.Type.PBR; the glow is emissive, so add bloom for the full effect.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    VEC3 the cool colour: lava crust, slime, the floor under water.
    static final String
    VEC3 the hot colour: molten cracks, glow, caustic light.
    static final String
    FLOAT how bright the glow is.
    static final String
    FLOAT pattern repeats per world unit.
    static final String
    FLOAT world height of the water surface, for caustics.
  • Method Summary

    Modifier and Type
    Method
    Description
    Caustics: the dancing net of light under a water surface, added to whatever the mesh already looks like.
    Lava: dark cooling plates drifting over molten cracks that pulse.
    Toxic sludge: glossy, slowly churning, with glowing bubbles that swell and pop.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • lava

      public static ShaderMaterial lava()

      Lava: dark cooling plates drifting over molten cracks that pulse.

      Returns

      a new shader material

    • toxic

      public static ShaderMaterial toxic()

      Toxic sludge: glossy, slowly churning, with glowing bubbles that swell and pop.

      Returns

      a new shader material

    • caustics

      public static ShaderMaterial caustics()

      Caustics: the dancing net of light under a water surface, added to whatever the mesh already looks like. Only below SURFACE, fading with depth. Put it on the sea bed, pool walls and anything sunk.

      Returns

      a new shader material