Renders the object into a small offscreen target and returns its pixels. The canvas and the main render are not changed:
the render target, clear colour and autoClear of the renderer are put back, and no viewer.setDirty() is needed.
The object is rendered into a linear half float target (8 bit when the device cannot render to half float; with MSAA, transparent background), then tone mapped with
SnapObjectOptions.toneMapping, converted to SnapObjectOptions.outputColorSpace and read back.
Screen space effects of the viewer (SSAO, SSR and similar material extensions) are off in this render, since they read the buffers of the main view.
Call it from preFrame or postFrame of the viewer (not during a render), with the object in options.root. For usage see MaterialPreviewGenerator.
Renders the object into a small offscreen target and returns its pixels. The canvas and the main render are not changed: the render target, clear colour and
autoClearof the renderer are put back, and noviewer.setDirty()is needed.The object is rendered into a linear half float target (8 bit when the device cannot render to half float; with MSAA, transparent background), then tone mapped with SnapObjectOptions.toneMapping, converted to SnapObjectOptions.outputColorSpace and read back. Screen space effects of the viewer (SSAO, SSR and similar material extensions) are off in this render, since they read the buffers of the main view.
Call it from
preFrameorpostFrameof the viewer (not during a render), with the object inoptions.root. For usage see MaterialPreviewGenerator.