The base shader class of PrimarySpriteMesh.

Hierarchy (view full)

Properties

initialUniforms: object

The initial values of the shader uniforms.

depthShaderClass: typeof DepthSamplerShader = DepthSamplerShader

The depth shader class associated with this shader.

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

Type declaration

  • id: string
  • size: number
  • normalized: boolean
  • type: any
batchVertexSize: number = 7
reservedTextureUnits: number = 1
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
pausable: boolean = true

Is this shader pausable or not?

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.

_batchVertexShader: string = ...

The batch vertex shader source. Subclasses can override it.

_batchFragmentShader: string = ...

The batch fragment shader source. Subclasses can override it.

_vertexShader: string = ...

The vertex shader source. Subclasses can override it.

_fragmentShader: string = ...

The fragment shader source. Subclasses can override it.

Accessors

  • 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

  • Protected

    One-time configuration that is called when the depth shader is created.

    Parameters

    Returns void

  • Parameters

    • maxTex: any

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

    • screenDimensions: number[]
    • occlusionTexture: any
  • Parameters

    • element: any
    • attributeBuffer: any
    • indexBuffer: any
    • aIndex: any
    • iIndex: any

    Returns void

  • 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