rullino
    Preparing search index...

    Function importImage

    • Uploads an 8-bit sRGB image (ImageBitmap, ImageData, canvas, , ...) into a working texture. The copy lands in an rgba8unorm-srgb texture, so sampling decodes sRGB in hardware; a compute pass then premultiplies in linear light (premultiplying in sRGB space would be wrong).

      Parameters

      • ctx: GpuContext
      • source: GPUCopyExternalImageSource

      Returns GPUTexture