Function createImageTexture

  • This function creates a texture and a sampler from an image file, and returns an object that contains attributes texture and sampler.

    Parameters

    • device: GPUDevice

      GPU device

    • imageFile: string

      the path of the image file to load

    • addressModeU: string = 'repeat'

      (optional) the addressing model for the u texture coordinate, defaulting to 'repeat'

    • addressModeV: string = 'repeat'

      (optional) the addressing model for the v texture coordinate, defaulting to 'repeat'

    Returns Promise<{
        sampler: GPUSampler;
        texture: GPUTexture;
    }>

Generated using TypeDoc