Skip to main content


onProcessCpu: ({ framework, frameStartResult, processGpuResult })


onProcessCpu() is called to read results of GPU processing and return usable data. Called with { frameStartResult, processGpuResult }. Data returned by modules in onProcessGpu will be present as processGpu.modulename where the name is given by = "modulename".

frameworkThe framework bindings for this module for dispatching events.
frameStartResultThe data that was provided at the beginning of a frame.
processGpuResultData returned by all installed modules during onProcessGpu.


Any data that you wish to provide to onUpdate should be returned. It will be provided to that method as processCpuResult.modulename


name: 'mycamerapipelinemodule',
onProcessCpu: ({ frameStartResult, processGpuResult }) => {
const GLctx = frameStartResult.GLctx
const { cameraTexture } = frameStartResult
const { camerapixelarray, mycamerapipelinemodule } = processGpuResult

// Do something interesting with mycamerapipelinemodule.gpuDataA and mycamerapipelinemodule.gpuDataB

// These fields will be provided to onUpdate
return {cpuDataA, cpuDataB}