Options
All
  • Public
  • Public/Protected
  • All
Menu

The default coloration shader used by standard rendering and animations A fragment shader which creates a solid light source.

implements

{AdaptiveLightingShader}

Hierarchy

Index

Constructors

Accessors

  • get isRequired(): boolean
  • Flag whether the background shader is currently required. Check vision modes requirements first, then if key uniforms are at their default values, we don't need to render the background container.

    Returns boolean

  • get COLORATION_TECHNIQUES(): string
  • The coloration technique coloration shader fragment

    Returns string

  • get ILLUMINATION_TECHNIQUES(): string
  • The coloration technique illumination shader fragment

    Returns string

  • get BACKGROUND_TECHNIQUES(): string
  • The coloration technique background shader fragment

    Returns string

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

    Returns string

Methods

  • getDarknessPenalty(darknessLevel: number, luminosity: number): number
  • Determine the correct penalty to apply for a given darkness level and luminosity

    Parameters

    • darknessLevel: number

      The current darkness level on [0,1]

    • luminosity: number

      The light source luminosity on [-1,1]

    Returns number

    The amount of penalty to apply on [0,1]

  • getShaderTechniques(shaderType: string): string
  • Construct adaptive shader according to shader type

    Parameters

    • shaderType: string

      shader type to construct : coloration, illumination, background, etc.

    Returns string

    the constructed shader adaptive block

Properties

_defaults: any

The initial default values of shader uniforms

FRAGMENT_END: string = ...

Shader final

FALLOFF: string = ...

Incorporate falloff if a attenuation uniform is requested

SHADER_HEADER: string = ...

Memory allocations for the Adaptive Background Shader

fragmentShader: string = ...

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

defaultUniforms: { technique: any; contrast: any; shadows: any; saturation: any; intensity: any; attenuation: any; exposure: number; ratio: number; darkness: boolean; color: number[]; colorBackground: number[]; screenDimensions: number[]; time: number; useSampler: boolean; primaryTexture: any; depthTexture: any; depthElevation: number } = ...

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

Type declaration

  • technique: any
  • contrast: any
  • shadows: any
  • saturation: any
  • intensity: any
  • attenuation: any
  • exposure: number
  • ratio: number
  • darkness: boolean
  • color: number[]
  • colorBackground: number[]
  • screenDimensions: number[]
  • time: number
  • useSampler: boolean
  • primaryTexture: any
  • depthTexture: any
  • depthElevation: number
vertexShader: string = ...

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

CONTRAST: string = ...

Contrast adjustment

SATURATION: string = ...

Saturation adjustment

EXPOSURE: string = ...

Exposure adjustment

SWITCH_COLOR: string = ...

Switch between an inner and outer color, by comparing distance from center to ratio Apply a strong gradient between the two areas if attenuation uniform is set to true

SHADOW: string = ...

Shadow adjustment

TRANSITION: string = ...

Transition between bright and dim colors, if requested

FRAGMENT_BEGIN: string = ...

Initialize fragment with common properties

SHADER_TECHNIQUES: Object = ...

A mapping of available shader techniques