Interface EffectUniform


public interface EffectUniform
One named uniform of a screen effect, written into every pass that declares it.

Until it's given a value, a uniform keeps the default its effect definition declares. Its value comes from, in order of precedence: a binding, a running animation, then the last value set. Values are converted to the declared type: floats are truncated into int uniforms, and missing components are 0.

  • Method Details

    • name

      String name()
    • set

      EffectUniform set(float... values)
      Sets a float, vec2, vec3 or vec4 (or a 4x4 matrix from 16 column-major floats). Stops any animation.
    • setInt

      EffectUniform setInt(int... values)
      Sets an int or ivec3. Stops any animation.
    • set

      default EffectUniform set(org.joml.Vector2fc value)
    • set

      default EffectUniform set(org.joml.Vector3fc value)
    • set

      default EffectUniform set(org.joml.Vector4fc value)
    • set

      default EffectUniform set(org.joml.Matrix4fc value)
    • setColor

      default EffectUniform setColor(int argb)
      Sets an RGBA color from a packed ARGB int, as a vec4.
    • animateTo

      EffectUniform animateTo(Easing easing, int ticks, float... target)
      Moves the value from where it is now to target over ticks ticks of real time (20 per second).
    • animateTo

      default EffectUniform animateTo(int ticks, float... target)
    • bind

      Computes a float value every frame, overriding set and animated values until unbind().
    • bind

      Computes a vector value every frame, overriding set and animated values until unbind().
    • unbind

      EffectUniform unbind()
    • reset

      EffectUniform reset()
      Drops the binding, animation and set value: the definition's default applies again.
    • get

      float get()
      The current first component: the definition's default if never set, 0 before the effect has loaded.
    • getAll

      float[] getAll()
      The current components, as floats: the definition's default if never set, empty before the effect has loaded.