Luxar Viewer API Documentation - v2026.10.19
    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. Readback Y orientation — native WebGPU returns top-down rows and takes top-down region coordinates; WebGLRenderer and WebGPURenderer's WebGL2 fallback use bottom-up rows and coordinates. caps.readbackYDown follows the active backend; framebufferYDown describes shader sampling, which differs on the fallback. Native top-down readback was verified with three r185 on M4 and Dawn/SwiftShader. Returns top-down rows by default; flipY: true returns bottom-up rows for consumers such as EXR export.

      Type Parameters

      Parameters

      Returns Promise<ReadPixelsResult<K>>