List of graphics commands to execute.
Command buffers hold list of rendering commands ("set render target, draw mesh, ..."). They can be set to execute at various points during camera rendering (see Camera.AddCommandBuffer), light rendering (see Light.AddCommandBuffer) or be executed immediately (see Graphics.ExecuteCommandBuffer).
Typically they would be used to extend Unity's rendering pipeline in some custom ways. For example, you could render some additional objects into deferred rendering g-buffer after all regular objects are done, or do custom processing of light
shadow maps. See command buffers overview page for more details.
Command buffers can be created and then executed many times if needed.
See Also: Camera.AddCommandBuffer, Light.AddCommandBuffer, CameraEvent, LightEvent, Graphics.ExecuteCommandBuffer, command buffers overview.
name | Name of this command buffer. |
sizeInBytes | Size of this command buffer in bytes (Read Only). |
CommandBuffer | Create a new empty command buffer. |
Blit | Add a "blit into a render texture" command. |
Clear | Clear all commands in the buffer. |
ClearRenderTarget | Adds a "clear render target" command. |
DrawMesh | Add a "draw mesh" command. |
DrawProcedural | Add a "draw procedural geometry" command. |
DrawProceduralIndirect | Add a "draw procedural geometry" command. |
DrawRenderer | Add a "draw renderer" command. |
GetTemporaryRT | Add a "get a temporary render texture" command. |
ReleaseTemporaryRT | Add a "release a temporary render texture" command. |
SetGlobalColor | Add a "set global shader color property" command. |
SetGlobalFloat | Add a "set global shader float property" command. |
SetGlobalMatrix | Add a "set global shader matrix property" command. |
SetGlobalTexture | Add a "set global shader texture property" command. |
SetGlobalVector | Add a "set global shader vector property" command. |
SetRenderTarget | Add a "set active render target" command. |