Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ConfigureTarget(RenderTargetIdentifier, bool, bool)

Binds this AttachmentDescriptor to the given target surface.
Read time 1 minuteLast updated 6 days ago

Definition

public void ConfigureTarget(RenderTargetIdentifier target, bool loadExistingContents, bool storeResults)

Parameters


loadExistingContents

Whether to read in the existing contents of the surface when the RenderPass starts.

storeResults

Whether to store the rendering results of the attachment when the RenderPass ends.

Remarks

This method sets the backing storage of this AttachmentDescriptor to the given target surface.
If loadExistingContents is true, changes AttachmentDescriptor.loadAction to Load unless the load action is already set to Clear, in which case this parameter is ignored.
If
storeResults
is true, changes AttachmentDescriptor.storeAction to either RenderBufferStoreAction.Store or RenderBufferStoreAction.StoreAndResolve depending on whether the
resolveAttachment
was configured or not.
Note: If you call both AttachmentDescriptor.ConfigureResolveTarget with
storeResults
set to
true
and
ConfigureTarget
, Unity stores both the resolved and unresolved MSAA surfaces respectively in
resolveTarget
and
loadStoreTarget
. This means Unity writes more data to memory.