Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TextureTools

Class used to host texture specific utilities

Hierarchy

  • TextureTools

Index

Methods

Static ApplyPostProcessSearch playground for ApplyPostProcess

  • Apply a post process to a texture

    Parameters

    • postProcessName: string

      name of the fragment post process

    • internalTexture: InternalTexture

      the texture to encode

    • scene: Scene

      the scene hosting the texture

    • Optional type: number

      type of the output texture. If not provided, use the one from internalTexture

    • Optional samplingMode: number

      sampling mode to use to sample the source texture. If not provided, use the one from internalTexture

    • Optional format: number

      format of the output texture. If not provided, use the one from internalTexture

    Returns Promise<InternalTexture>

    a promise with the internalTexture having its texture replaced by the result of the processing

Static CreateResizedCopySearch playground for CreateResizedCopy

  • CreateResizedCopy(texture: Texture, width: number, height: number, useBilinearMode?: boolean): Texture
  • Uses the GPU to create a copy texture rescaled at a given size

    Parameters

    • texture: Texture

      Texture to copy from

    • width: number

      defines the desired width

    • height: number

      defines the desired height

    • Optional useBilinearMode: boolean

      defines if bilinear mode has to be used

    Returns Texture

    the generated texture

Static FromHalfFloatSearch playground for FromHalfFloat

  • FromHalfFloat(value: number): number
  • Converts a half float to a number

    Parameters

    • value: number

      half float to convert

    Returns number

    converted half float

Static ToHalfFloatSearch playground for ToHalfFloat

  • ToHalfFloat(value: number): number
  • Converts a number to half float

    Parameters

    • value: number

      number to convert

    Returns number

    converted number

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method