Options
All
  • Public
  • Public/Protected
  • All
Menu

An occlusion shader to reveal certain area with elevation comparisons. This shader is also working as a batched plugin.

Hierarchy

Index

Constructors

Methods

  • _preRender(mesh: any): void
  • batchDefaultUniforms(maxTex: any): { screenDimensions: number[]; _occlusionTexture: any }
  • A function that returns default uniforms associated with the batched version of this sampler.

    override

    Parameters

    • maxTex: any

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

    • screenDimensions: number[]
    • _occlusionTexture: any
  • _preRenderBatch(batchRenderer: any): void
  • initializeBatchGeometry(): void
  • _packInterleavedGeometry(element: any, attributeBuffer: any, indexBuffer: any, aIndex: any, iIndex: any): void
  • Pack interleaved geometry custom function.

    override

    Parameters

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

    Returns void

  • createPlugin(): any
  • Create a batch plugin for this sampler class.

    Returns any

    The batch plugin class linked to this sampler class.

  • registerPlugin(): void

Properties

pluginName: string

The plugin name associated for this instance.

_defaults: any

The initial default values of shader uniforms

#enabled: boolean = true
classPluginName: string = "occlusion"
override
reservedTextureUnits: number = 1
override
batchVertexSize: number = 7
override
batchGeometry: typeof BatchGeometry

Batch geometry associated with this sampler.

batchVertexShader: string = ...
override
batchFragmentShader: string = ...
override
vertexShader: string = ...

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

fragmentShader: string = ...

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

defaultUniforms: { tintAlpha: number[]; sampler: number; occlusionTexture: number; occlusionMode: number; screenDimensions: number[] } = ...

The default uniform values for the shader. A subclass of AbstractBaseShader must implement the defaultUniforms static field.

Type declaration

  • tintAlpha: number[]
  • sampler: number
  • occlusionTexture: number
  • occlusionMode: number
  • screenDimensions: 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.

Accessors

  • get enabled(): boolean
  • set enabled(enabled: boolean): void
  • 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

  • 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)

    Parameters

    • enabled: boolean

    Returns void

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

    Returns string