Table of Contents

Class ComputeProgramConfiguration

Namespace
Bonsai.Shaders.Configuration
Assembly
Bonsai.Shaders.dll

Provides configuration and loading functionality for compute shader programs.

public class ComputeProgramConfiguration : ShaderConfiguration, IResourceConfiguration
Inheritance
ComputeProgramConfiguration
Implements
Inherited Members

Properties

ComputeShader

Gets or sets the path to the compute shader file.

[FileNameFilter("Compute Shader Files (*.comp)|*.comp|All Files (*.*)|*.*")]
public string ComputeShader { get; set; }

Property Value

string

WorkGroups

Gets or sets a value specifying the number of workgroups to be launched when dispatching the compute shader.

public DispatchParameters WorkGroups { get; set; }

Property Value

DispatchParameters

Methods

CreateResource(ResourceManager)

Creates a new compute shader program resource.

public override Shader CreateResource(ResourceManager resourceManager)

Parameters

resourceManager ResourceManager

The ResourceManager object onto which this resource will be loaded. The resource manager can be accessed to load additional resource dependencies which may be required to create the new resource.

Returns

Shader

A new instance of the Shader class representing the compiled compute shader.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.