The shader definition which powers the TokenRing.

Hierarchy (view full)

Properties

initialUniforms: object

The initial values of the shader uniforms.

classPluginName: string = "tokenRingBatch"
pausable: boolean = false
batchGeometry: {
    id: string;
    size: number;
    normalized: boolean;
    type: any;
}[] = ...

Type declaration

  • id: string
  • size: number
  • normalized: boolean
  • type: any
batchVertexSize: number = ...
reservedTextureUnits: number = ...
nullUvs: Float32Array = ...

A null UVs array used for nulled texture position.

_batchVertexShader: string = ...
_batchFragmentShader: string = ...
depthShaderClass: typeof DepthSamplerShader = DepthSamplerShader

The depth shader class associated with this shader.

defaultUniforms: {
    screenDimensions: number[];
    sampler: any;
    tintAlpha: number[];
    occlusionTexture: any;
    unoccludedAlpha: number;
    occludedAlpha: number;
    occlusionElevation: number;
    fadeOcclusion: number;
    radialOcclusion: number;
    visionOcclusion: number;
} = ...

Type declaration

  • screenDimensions: number[]
  • sampler: any
  • tintAlpha: number[]
  • occlusionTexture: any
  • unoccludedAlpha: number
  • occludedAlpha: number
  • occlusionElevation: number
  • fadeOcclusion: number
  • radialOcclusion: number
  • visionOcclusion: number
CONTRAST: string = ...

Contrast adjustment

SATURATION: string = ...

Saturation adjustment

EXPOSURE: string = ...

Exposure adjustment.

batchRendererClass: typeof BatchRenderer = BatchRenderer

The batch renderer to use.

batchShaderGeneratorClass: typeof BatchShaderGenerator = BatchShaderGenerator

The batch generator to use.

_vertexShader: string = ...

The vertex shader source. Subclasses can override it.

_fragmentShader: string = ...

The fragment shader source. Subclasses can override it.

#FRAG_HEADER: string = ...

The fragment shader header.

#FRAG_MAIN: string = ...

Fragment shader body.

#FRAG_MAIN_DEBUG: string = ...

Fragment shader body for debug code.

Accessors

  • get depthShader(): DepthSamplerShader
  • The depth shader associated with this shader. The depth shader is lazily constructed.

    Returns DepthSamplerShader

  • get pluginName(): string
  • The plugin name associated for this instance, if any. Returns "batch" if the shader is disabled.

    Returns string

  • get enabled(): boolean
  • Activate or deactivate this sampler. If set to false, the batch rendering is redirected to "batch". Otherwise, the batch rendering is directed toward the instance pluginName (might be null)

    Returns boolean

  • get paused(): boolean
  • Pause or Unpause this sampler. If set to true, the shader is disabled. Otherwise, it is enabled. Contrary to enabled, a shader might decide to refuse a pause, to continue to render animations per example.

    Returns boolean

    See

  • get batchVertexShader(): string
  • Returns string

  • get batchFragmentShader(): string
  • Returns string

  • get vertexShader(): string
  • Returns string

  • get fragmentShader(): string
  • Returns string

  • get ADJUSTMENTS(): string
  • The adjustments made into fragment shaders.

    Returns string

Methods

  • Parameters

    • maxTex: any

    Returns {
        tokenRingTexture: any;
        time: number;
        screenDimensions: number[];
        occlusionTexture: any;
    }

    • tokenRingTexture: any
    • time: number
    • screenDimensions: number[]
    • occlusionTexture: any
  • Create a batch plugin for this sampler class.

    Returns any

    The batch plugin class linked to this sampler class.

  • Register the plugin for this sampler.

    Parameters

    • Optional options: {
          force: object;
      } = {}

      The options

      • force: object

        Override the plugin of the same name that is already registered?

    Returns void