Offscreen Canvas
Headless GPU renderings with CPU readbacks
GPUOffscreenCanvas is a helper shim that mimics the Web OffscreenCanvas API. It is offered as a convenience to quickly produce offscreen renderings with CPU readback.
Basic usage
import { } from "react-native-webgpu";
const = new (256, 256);
const = .("webgpu")!;
const = await .();
.({ , : "rgba8unorm" });
// encode render passes into the offscreen target…
..([.()]);
const = await .(); // CPU readback