Class TextureImportOptions

Contains import options you may use to control how is a texture imported.

Hierarchy (view full)

Constructors

Accessors

  • get contentType(): EnumValue<TextureContentType, number>
  • Determines the content type of the imported image. The type serves two purposes:

    • Additional processing may occure upon import, such as cubemap or RCS-map conversions. - Filtering in the UI to enable selection of textures based on their content type.

    Returns EnumValue<TextureContentType, number>

  • set contentType(value): void
  • Parameters

    Returns void

  • get isAutomaticCompressionEnabled(): boolean
  • Enables automatic texture compression based on the selected format. This is highly recommended to lower the VRAM requirements, streaming performance and on-disk usage.

    If the selected format is already a compressed format, this option is ignored.

    Returns boolean

  • set isAutomaticCompressionEnabled(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isCachingMipMapsOnDisk(): boolean
  • When mip map generation is enabled, determines if the mip maps will be cached on disk. For most scenarios, it is likely faster to generate the mip map data when loading in the texture dynamically.

    Returns boolean

  • set isCachingMipMapsOnDisk(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isColorspaceSRGB(): boolean
  • Determines whether the texture data should be treated as if its in sRGB (gamma) space. Such texture will be converted by hardware to linear space before use on the GPU.

    Returns boolean

  • set isColorspaceSRGB(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isCPUCached(): boolean
  • Determines whether the texture data is also stored in main memory, available for fast CPU access. However, asynchronous GPU read-back should be preferred to be used in the rendering pipeline. For compressed textures, the CPU cache data remains compressed and must be manually decompressed before use.

    Returns boolean

  • set isCPUCached(value): void
  • Parameters

    • value: boolean

    Returns void

  • get isGeneratingMipMaps(): boolean
  • Enables or disables mipmap generation for the texture.

    Returns boolean

  • set isGeneratingMipMaps(value): void
  • Parameters

    • value: boolean

    Returns void

  • get maximumAnisotropicFilteringSampleCount(): number
  • Determines the maximum number of samples allowed during anisotropic filtering. Should be in range [1, 16], but the maximum range can be higher or lower depending on the hardware.

    Returns number

  • set maximumAnisotropicFilteringSampleCount(value): void
  • Parameters

    • value: number

    Returns void

  • get maximumGeneratedMipMapLevel(): number
  • Maximum mip level to generate when generating mipmaps. If 0 then the entire mip-map chain will be generated.

    Returns number

  • set maximumGeneratedMipMapLevel(value): void
  • Parameters

    • value: number

    Returns void

  • get normalMapType(): EnumValue<NormalMapType, number>
  • Determines the format of the Normal or Vector Map.

    Returns EnumValue<NormalMapType, number>

    Only used if contentType is a type that contains normal or vector information such as NormalMapTangent. The default normal map type is DirectX using OpenGL incurs a performs hit during import.

  • set normalMapType(value): void
  • Parameters

    Returns void

Methods

  • Virtual

    Checks if this object has the same contents as the provided one.

    Parameters

    Returns boolean