Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Unified pixel readback. Hides three backend differences from callers:

      1. Method-signature dispatch — WebGL2's readRenderTargetPixelsAsync takes a destination buffer; WebGPU's returns the result.
      2. WebGPU row padding — WebGPU's copyTextureToBuffer rounds bytesPerRow up to 256; this primitive runs compactWebGPUReadbackRows unconditionally (no-op for aligned widths or under WebGL2).
      3. Framebuffer Y orientation — both renderer surfaces return bottom-up rows from readRenderTargetPixelsAsync: WebGLRenderer is calling gl.readPixels underneath, and WebGPURenderer's compat layer maintains the same contract on both its real-WebGPU and WebGL2 backends. (caps.framebufferYDown describes the sampling convention used by createFullscreenTriangleGeometry, NOT the readback memory layout — empirically the two have diverged on WebGPURenderer.) The primitive canonicalises to top-down by default. Pass flipY: true to get bottom-up rows out instead — only the EXR exporter does this today, to preserve the orientation external tools (Nuke, Houdini, oiiotool) expect.

      Type Parameters

      Parameters

      Returns Promise<ReadPixelsResult<K>>