class ComputeShader
A compute shader is a program that runs on the GPU, often with data provided to/from the CPU by means of a or a .
public RenderAttributes Attributes { get; }
Attributes that are passed to the compute shader on dispatch.
public ComputeShader( string path )
Create a compute shader from the specified path.
public void Dispatch( int threadsX = 32, int threadsY = 32, int threadsZ = 32 )
Dispatch this compute shader using explicit thread counts.
Remarks: The specified thread counts will be automatically divided by the thread group size defined in the shader to compute the final dispatch group count. When called outside a graphics context, the dispatch runs immediately. When called inside a graphics context, the dispatch runs async.
threadsXThe number of threads to dispatch in the X dimension.threadsYThe number of threads to dispatch in the Y dimension.threadsZThe number of threads to dispatch in the Z dimension.
public void DispatchIndirect( GpuBuffer indirectBuffer, uint indirectElementOffset = 0 )
Dispatch this compute shader by reading thread group counts (x, y, z) from an indirect buffer of type .
Remarks: must be created with and have an element size of 12 bytes. is an element index into , not a byte offset. When called outside a graphics context, the dispatch runs immediately. When called inside a graphics context, the dispatch runs async.
indirectBufferThe GPU buffer containing one or more dispatch argument entries.indirectElementOffsetThe index of the dispatch arguments element to use (each element = 12 bytes).
public void DispatchWithAttributes( RenderAttributes attributes, int threadsX = 32, int threadsY = 32, int threadsZ = 32 )
🤡 Doc inheritance is not yet supported.
No summary.
public void DispatchIndirectWithAttributes( RenderAttributes attributes, GpuBuffer indirectBuffer, uint indirectElementOffset = 0 )
🤡 Doc inheritance is not yet supported.
No summary.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.