Options
Menu

Class ShadowDitheredMethod

ShadowDitheredMethod provides a soft shadowing technique by randomly distributing sample points differently for each fragment.

Hierarchy

Implements

  • IAsset
  • IAssetAdapter

Index

Constructors

constructor

  • new ShadowDitheredMethod(castingLight: DirectionalLight, numSamples?: number, range?: number): ShadowDitheredMethod
  • Creates a new ShadowDitheredMethod object.

    Parameters

    • castingLight: DirectionalLight

      The light casting the shadows

    • Default value numSamples: number = 4

      The amount of samples to take for dithering. Minimum 1, maximum 24.

    • Default value range: number = 1

    Returns ShadowDitheredMethod

Properties

_adapter

_adapter: IAssetAdapter

Protected _alpha

_alpha: number

Protected _castingLight

_castingLight: LightBase

_counts

_counts: Array<number>

Protected _epsilon

_epsilon: number

_owners

_owners: Array<IMaterial>

_textures

_textures: Array<TextureBase>

adaptee

adaptee: AssetBase

adapter

adapter: IAssetAdapter

adapter is used to provide MovieClip to scripts taken from different platforms setter typically managed by factory. getter defaults to AwayJS class

assetFullPath

assetFullPath: Array<string>

assetNamespace

assetNamespace: string

id

id: number

A unique id for the asset, used to identify assets in an associative array

name

name: string

originalName

originalName: string

The original name used for this asset in the resource (e.g. file) in which it was found. This may not be the same as name, which may have changed due to of a name conflict.

Static DEFAULT_NAMESPACE

DEFAULT_NAMESPACE: string

Static ID_COUNT

ID_COUNT: number

Static _grainTexture

_grainTexture: Single2DTexture

Static assetType

assetType: string

Accessors

alpha

  • get (): number
  • set (value: number): void
  • The "transparency" of the shadows. This allows making shadows less strong.

    Returns number

  • The "transparency" of the shadows. This allows making shadows less strong.

    Parameters

    • value: number

    Returns void

assetType

  • get (): string
  • inheritdoc

    Returns string

castingLight

  • get (): LightBase

epsilon

  • get (): number
  • set (value: number): void
  • A small value to counter floating point precision errors when comparing values in the shadow map with the calculated depth value. Increase this if shadow banding occurs, decrease it if the shadow seems to be too detached.

    Returns number

  • A small value to counter floating point precision errors when comparing values in the shadow map with the calculated depth value. Increase this if shadow banding occurs, decrease it if the shadow seems to be too detached.

    Parameters

    • value: number

    Returns void

numSamples

  • get (): number
  • set (value: number): void
  • The amount of samples to take for dithering. Minimum 1, maximum 24. The actual maximum may depend on the complexity of the shader.

    Returns number

  • The amount of samples to take for dithering. Minimum 1, maximum 24. The actual maximum may depend on the complexity of the shader.

    Parameters

    • value: number

    Returns void

range

  • get (): number
  • set (value: number): void
  • The range in the shadow map in which to distribute the samples.

    Returns number

  • The range in the shadow map in which to distribute the samples.

    Parameters

    • value: number

    Returns void

Methods

addEventListener

  • addEventListener(type: string, listener: function): void
  • Add an event listener

    method

    addEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

assetPathEquals

  • assetPathEquals(name: string, ns: string): boolean
  • Parameters

    • name: string
    • ns: string

    Returns boolean

clear

  • clear(): void
  • Returns void

copyFrom

  • Copies the state from a ShadingMethodBase object into the current object.

    Parameters

    Returns void

dispatchEvent

  • dispatchEvent(event: EventBase): void
  • Dispatch an event

    method

    dispatchEvent

    Parameters

    • event: EventBase

    Returns void

dispose

  • dispose(): void

hasEventListener

  • hasEventListener(type: string, listener?: function): boolean
  • check if an object has an event listener assigned to it

    method

    hasListener

    Parameters

    • type: string
    • Optional listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns boolean

iAddOwner

  • iAddOwner(owner: IMaterial): void

iAddTexture

  • iAddTexture(texture: TextureBase): void

iRemoveOwner

  • iRemoveOwner(owner: IMaterial): void

iRemoveTexture

  • iRemoveTexture(texture: TextureBase): void

invalidate

  • invalidate(): void
  • Returns void

invalidateShaderProgram

  • invalidateShaderProgram(): void
  • Marks the shader program as invalid, so it will be recompiled before the next render.

    internal

    Returns void

isAsset

  • isAsset(assetClass: IAssetClass): boolean
  • Parameters

    • assetClass: IAssetClass

    Returns boolean

removeEventListener

  • removeEventListener(type: string, listener: function): void
  • Remove an event listener

    method

    removeEventListener

    Parameters

    • type: string
    • listener: function
        • (event: EventBase): void
        • Parameters

          • event: EventBase

          Returns void

    Returns void

resetAssetPath

  • resetAssetPath(name: string, ns?: string, overrideOriginal?: boolean): void
  • Parameters

    • name: string
    • Optional ns: string
    • Optional overrideOriginal: boolean

    Returns void

updateFullPath

  • updateFullPath(): void
  • Returns void

Generated using TypeDoc