AlphaAlpha
Frees the resources the reader owns and stops reading for this camera. Reads which have not been rendered yet report their region as empty, and one already in flight does the same once it completes, rather than writing samples read through resources this has let go of.
Alpha
Requests the depth of a region of the view, as width * height samples in row major order. The
region is point sampled rather than averaged - one sample per cell, taken at its centre - so
asking for more samples than the region resolves to repeats them.
Samples where nothing was rendered read as Infinity, as do the few which land within a hair of
the far clip, that being the depth an empty pixel reports.
The region of the view to sample, normalized, with its origin in the bottom left as CameraComponent#rect.
The number of samples across the region. Not pixels.
The number of samples down the region.
Optionaltarget: Float32Array<ArrayBufferLike>
An array to fill, at least width * height long. One is
allocated when not given. It is filled when the returned promise resolves, so an array must not
be shared between reads which overlap in time.
The samples, in world units, or null when the camera is disabled or is not rendering a scene depth, leaving nothing to read.
Reads the scene depth of a camera back to the CPU.
A sample is the distance from the camera to the surface at that point, in world units, measured along the camera's view direction.
Reads are asynchronous and land a frame or two later. Any number of them may be in flight at once, so a read can be issued every frame without waiting for the previous one to finish.
Note that something has to be rendering the depth for there to be anything to read: an effect which consumes it, or CameraComponent#requestSceneDepthMap.