DriftCapture · function

accumulateGradients

The gradients of a render against dPixels — the loss's derivative by each rendered channel, four a pixel — added into out. The render is repeated here rather than taken as an argument, because the backward walk needs what each Gaussian contributed on the way.

Explained in DriftCapture.

function accumulateGradients(set: GaussianSet, camera: RasterCamera, dPixels: Float64Array, out: GaussianGradients): void
import { accumulateGradients } from '@driftengine/capture';

Parameters

ParameterTypeDescription
setGaussianSet
cameraRasterCamera
dPixelsFloat64Array
outGaussianGradients