Version: 2023.2
public void ConfigureTarget (Rendering.RenderTargetIdentifier target, bool loadExistingContents, bool storeResults);

参数

tgt 要用作此 AttachmentDescriptor 的备份存储的表面。
loadExistingContents 是否在渲染通道启动时读取表面的现有内容。
storeResults 是否在渲染通道结束时存储附件的渲染结果。

描述

将此 AttachmentDescriptor 绑定到给定目标表面。

此方法将 AttachmentDescriptor 的备份存储设置为给定目标表面。

如果 loadExistingContents 为 true,则将 loadAction 更改为 RenderBufferStoreAction.Load,除非加载操作已经设置为 RenderBufferStoreAction.Clear,在这种情况下此参数会被忽略。

If storeResults is true, changes storeAction to either RenderBufferStoreAction.Store or RenderBufferStoreAction.StoreAndResolve depending on whether the resolveAttachment was configured or not.

Note: If you call both 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.