Enum IBaseRenderGraphBuilder.AccessFlags
Express the operations the rendergraph pass will do on a resource.
Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[Flags]
public enum IBaseRenderGraphBuilder.AccessFlags
Fields
Name | Description |
---|---|
AllowGrab | Allow auto "Grabbing" a framebuffer to a texture at the beginning of the pass. Normally UseTexture(Read) in combination with UseFrameBuffer(x) is not allowed as the texture reads would not nececarily show modifications to the frame buffer. By passing this flag you indicate to the Graph it's ok to grab the frame buffer once at the beginning of the pass and then use that as the input texture. Depending on usage flags this may cause a new temporary buffer+buffer copy to be generated. This is mainly useful in complex cases were you are unsure the handles are coming from and they may sometimes refer to the same resource. Say you want to do distortion on the frame buffer but then also blend the distortion results over it. UseTexture(myBuff, Read | Grab) USeFrameBuffer(myBuff, ReadWrite) to achieve this if you have similar code UseTexture(myBuff1, Read | Grab) USeFrameBuffer(myBuff2, ReadWrite) where depending on the active passes myBuff1 may be different from myBuff@ the graph will always take the optimal path, not copying to a temp copy if they are in fact different, and auto-allocating a temp copy if they are. |
Discard | Previous data in the resource is not preserved. The resource will contain undefined data at the beginning of the pass. |
GrabRead | Shortcut for Read | AllowGrab |
None | The pass does not access the resource at all. Calling Use* functions with none has no effect. |
Read | This pass will read data the resource. Data in the resource should never be written unless one of the write flags is also present. Writing to a read-only resource may lead to undefined results, significant performance penaties, and GPU crashes. |
ReadWrite | Shortcut for Read | Write |
Write | This pass will at least write some data to the resource. Data in the resource should never be read unless one of the read flags is also present. Reading from a write-only resource may lead to undefined results, significant performance penaties, and GPU crashes. |
WriteAll | All data in the resource will be written by this pass. Data in the resource should never be read. |