class CommandList

in global :: Sandbox . Rendering

😔 No documentation found.


public RenderTargetHandle GrabFrameTexture( string token, bool withMips = False )

Takes a copy of the framebuffer and returns a handle to it

  • withMips Generates mipmaps on the grabbed texture filtered with gaussian blur for each mip

public RenderTargetHandle GrabDepthTexture( string token, bool withMips = False )

Takes a copy of the depthbuffer and returns a handle to it

  • withMips Generates mipmaps on the grabbed texture filtered with gaussian blur for each mip

public void InsertList( CommandList otherBuffer )

Run this CommandList here

public void DrawModel( Model model, Transform transform, RenderAttributes attributes = null )

Draws a single model at the given Transform immediately.

  • model The model to draw
  • transform Transform to draw the model at
  • attributes Optional attributes to apply only for this draw call

public void DrawModelInstancedIndirect( Model model, GpuBuffer buffer, int bufferOffset = 0, RenderAttributes attributes = null )

Draws multiple instances of a model using GPU instancing with the number of instances being provided by indirect draw arguments. Use `SV_InstanceID` semantic in shaders to access the rendered instance.

  • model The model to draw
  • buffer The GPU buffer containing the DrawIndirectArguments
  • bufferOffset Optional offset in the GPU buffer
  • attributes Optional attributes to apply only for this draw call

public void DrawModelInstanced( Model model, int count, RenderAttributes attributes = null )

Draws multiple instances of a model using GPU instancing. This is similar to , except the count is provided from the CPU rather than via a GPU buffer. Use `SV_InstanceID` semantic in shaders to access the rendered instance.

  • model The model to draw
  • count The number of instances to draw
  • attributes Optional attributes to apply only for this draw call

public void DrawInstancedIndirect( Material material, GpuBuffer indirectBuffer, uint bufferOffset = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

Draws instanced geometry using a vertex buffer and indirect draw arguments stored in a GPU buffer.

Remarks: Vertex data is accessed in shader through buffer attribute and SV_VertexID.

  • material The material to use for rendering.
  • indirectBuffer The GPU buffer containing indirect draw arguments.
  • bufferOffset Optional byte offset into the indirect buffer.
  • attributes Optional render attributes to apply only for this draw call.
  • primitiveType The type of primitives to render. Defaults to triangles.

public void DrawIndexedInstancedIndirect( GpuBuffer indexBuffer, Material material, GpuBuffer indirectBuffer, uint bufferOffset = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

Draws instanced indexed geometry using indirect draw arguments stored in a GPU buffer.

Remarks: Vertex data is accessed in shader through buffer attribute and SV_VertexID.

  • indexBuffer The GPU buffer containing index data.
  • material The material to use for rendering.
  • indirectBuffer The GPU buffer containing indirect draw arguments.
  • bufferOffset Optional byte offset into the indirect buffer.
  • attributes Optional render attributes to apply only for this draw call.
  • primitiveType The type of primitives to render. Defaults to triangles.

public RenderTargetHandle GetRenderTarget( string name, ImageFormat format, int numMips = 1, int sizeFactor = 1 )

Get a screen size render target.

public void ReleaseRenderTarget( RenderTargetHandle handle )

We're no longer using this RT, return it to the pool

public void Set( StringToken token, RenderTargetHandle.ColorTextureRef buffer, int mip = -1 )

Set the color texture from this named render target to this attribute

public void SetGlobal( StringToken token, RenderTargetHandle.ColorIndexRef buffer )

Set the color texture from this named render target to this attribute

public void DispatchCompute( ComputeShader compute, int threadsX, int threadsY, int threadsZ )

🤡 Doc inheritance is not yet supported.

No summary.

public void DispatchComputeIndirect( ComputeShader compute, GpuBuffer indirectBuffer, uint indirectElementOffset = 0 )

🤡 Doc inheritance is not yet supported.

No summary.

public RenderTargetHandle.SizeHandle ViewportSize { get; }

A handle to the viewport size

public void DispatchCompute( ComputeShader compute, RenderTargetHandle.SizeHandle dimension )

Dispatch a compute shader

public RenderTargetHandle TransferRenderTarget( RenderTargetHandle handle, CommandList targetCommandList )

Transfers ownership of a render target from this command list to another. The target command list becomes responsible for the render target.

  • handle The render target handle to transfer
  • targetCommandList The command list to transfer the render target to
  • Returns A new handle that can be used with the target command list

public void Clear( Color color, bool clearColor = True, bool clearDepth = True, bool clearStencil = True )

Clear the current drawing context to given color.

  • color Color to clear to.
  • clearColor Whether to clear the color buffer at all.
  • clearDepth Whether to clear the depth buffer.
  • clearStencil Whether to clear the stencil buffer.

public void ResourceBarrierTransition( Texture texture, ResourceState state )

Executes a barrier transition for the given GPU Texture Resource. Transitions the texture resource to a new pipeline stage and access state.

  • texture The texture to transition.
  • state The new resource state for the texture.

public void ResourceBarrierTransition( GpuBuffer buffer, ResourceState state )

Executes a barrier transition for the given GPU Buffer Resource. Transitions the buffer resource to a new pipeline stage and access state.

  • buffer The GPU buffer to transition.
  • state The new resource state for the buffer.

public void ResourceBarrierTransition( GpuBuffer buffer, ResourceState before, ResourceState after )

Executes a barrier transition for the given GPU Buffer Resource. Transitions the buffer resource from a known source state to a specified destination state.

  • buffer The GPU buffer to transition.
  • before The current resource state of the buffer.
  • after The desired resource state of the buffer after the transition.

public void DrawIndexedInstancedIndirect( GpuBuffer<T> vertexBuffer, GpuBuffer indexBuffer, Material material, GpuBuffer indirectBuffer, uint bufferOffset = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public void DrawInstancedIndirect( GpuBuffer<T> vertexBuffer, Material material, GpuBuffer indirectBuffer, uint bufferOffset = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

😔 No documentation found.

public void DrawIndexed( GpuBuffer<T> vertexBuffer, GpuBuffer indexBuffer, Material material, int startIndex = 0, int indexCount = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

😔 No documentation found.

public void Draw( GpuBuffer<T> vertexBuffer, Material material, int startVertex = 0, int vertexCount = 0, RenderAttributes attributes = null, Graphics.PrimitiveType primitiveType = Triangles )

😔 No documentation found.

public void DrawModelInstanced( Model model, Span<Transform> transforms, RenderAttributes attributes = null )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public CommandList( string debugName )

😔 No documentation found.

public string DebugName { get; set; }

😔 No documentation found.

public bool Enabled { get; set; }

😔 No documentation found.

public CommandList.Flag Flags { get; set; }

😔 No documentation found.

public void Reset( )

😔 No documentation found.

public void Blit( Material material )

😔 No documentation found.

public void DrawQuad( Rect rect, Material material, Color color )

😔 No documentation found.

public void DrawScreenQuad( Material material, Color color )

😔 No documentation found.

public void Set( StringToken token, float f )

😔 No documentation found.

public void Set( StringToken token, double f )

😔 No documentation found.

public void Set( StringToken token, Vector2 vector2 )

😔 No documentation found.

public void Set( StringToken token, Vector3 vector3 )

😔 No documentation found.

public void Set( StringToken token, Vector4 vector4 )

😔 No documentation found.

public void Set( StringToken token, int i )

😔 No documentation found.

public CommandList( )

😔 No documentation found.

public void Set( StringToken token, Matrix matrix )

😔 No documentation found.

public void Set( StringToken token, Texture texture )

😔 No documentation found.

public void SetCombo( StringToken token, int value )

😔 No documentation found.

public void SetCombo( StringToken token, T t )

😔 No documentation found.

public void SetConstantBuffer( StringToken token, T data )

😔 No documentation found.

public void SetGlobal( StringToken token, GpuBuffer buffer )

😔 No documentation found.

public void SetGlobal( StringToken token, int i )

😔 No documentation found.

public void SetGlobal( StringToken token, float f )

😔 No documentation found.

public void SetGlobal( StringToken token, double f )

😔 No documentation found.

public void SetGlobal( StringToken token, Vector2 vector2 )

😔 No documentation found.

public void SetGlobal( StringToken token, Vector3 vector3 )

😔 No documentation found.

public void SetGlobal( StringToken token, Vector4 vector4 )

😔 No documentation found.

public void SetGlobal( StringToken token, Matrix matrix )

😔 No documentation found.

public void Set( StringToken token, GpuBuffer buffer )

😔 No documentation found.

public void SetGlobal( StringToken token, Texture texture )

😔 No documentation found.