Rain shader effect.

Hierarchy (view full)

Properties

speed: number = 1

The speed multiplier applied to animation. 0 stops animation.

initialUniforms: object

The initial values of the shader uniforms.

defaultUniforms: {
    opacity: number;
    intensity: number;
    strength: number;
    rotation: number;
    resolution: number[];
} = ...

Default uniforms for a specific class

Type declaration

  • opacity: number
  • intensity: number
  • strength: number
  • rotation: number
  • resolution: number[]

Abstract

fragmentShader: string = ...

The raw fragment shader used by this class. A subclass of AbstractBaseShader must implement the fragmentShader static field.

COMPUTE_MASK: string = ...

Compute the weather masking value.

FRAGMENT_HEADER: string = ...

Compute the weather masking value.

commonUniforms: {
    useOcclusion: boolean;
    occlusionTexture: any;
    reverseOcclusion: boolean;
    occlusionWeights: number[];
    useTerrain: boolean;
    terrainTexture: any;
    reverseTerrain: boolean;
    terrainWeights: number[];
    alpha: number;
    tint: number[];
    screenDimensions: [number, number];
    effectDimensions: [number, number];
    depthElevation: number;
    time: number;
} = ...

Common uniforms for all weather shaders.

Type declaration

  • useOcclusion: boolean
  • occlusionTexture: any
  • reverseOcclusion: boolean
  • occlusionWeights: number[]
  • useTerrain: boolean
  • terrainTexture: any
  • reverseTerrain: boolean
  • terrainWeights: number[]
  • alpha: number
  • tint: number[]
  • screenDimensions: [number, number]
  • effectDimensions: [number, number]
  • depthElevation: number
  • time: number
vertexShader: string = ...

The raw vertex shader used by this class. A subclass of AbstractBaseShader must implement the vertexShader static field.

Accessors

  • set scale(scale): void
  • Update the scale of this effect with new values

    Parameters

    • scale: number | {
          x: number;
          y: number;
      }

      The desired scale

    Returns void

Methods