CNImageRenderingSession
A session for rendering a shallow depth-of-field (SDoF) effect onto still images using Metal.
Declaration
class CNImageRenderingSessionOverview
Use CNImageRenderingSession to apply a cinematic, lens-simulated bokeh effect to an image given a disparity map. For large images, prefer the tiled API to avoid excessive GPU memory usage.
A single session may be reused across multiple render calls. It is not thread-safe.
Topics
Initializers
Instance Properties
Instance Methods
encodeRender(to:sourceRGBA:sourceDisparity:destinationRGBA:fNumber:focusDisparity:)encodeTileRender(to:sourceTileRGBA:sourceDisparity:destinationTileRGBA:fNumber:focusDisparity:sourceRGBASize:tileOffset:tileExtendOffset:)