Table of Contents

Class ComputeEffectShader

Namespace
Stride.Rendering.ComputeEffect
Assembly
Stride.Rendering.dll

A compute effect based directly on a single compute shader.

public class ComputeEffectShader : DrawEffect, IComponent, IReferencable, ICollectorHolder, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
Inheritance
ComputeEffectShader
Implements
Inherited Members
Extension Methods

Constructors

ComputeEffectShader(RenderContext)

public ComputeEffectShader(RenderContext context)

Parameters

context RenderContext

Properties

EffectInstance

The current effect instance.

public DynamicEffectInstance EffectInstance { get; }

Property Value

DynamicEffectInstance

ShaderSourceName

Gets or sets the name of the input compute shader file (.sdsl)

public string ShaderSourceName { get; set; }

Property Value

string

ThreadGroupCounts

Gets or sets the number of group counts the shader should be dispatched to.

public Int3 ThreadGroupCounts { get; set; }

Property Value

Int3

ThreadNumbers

Gets or sets the number of threads desired by thread group.

public Int3 ThreadNumbers { get; set; }

Property Value

Int3

Methods

DrawCore(RenderDrawContext)

Main drawing method for this renderer that must be implemented.

protected override void DrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

The context.

PreDrawCore(RenderDrawContext)

protected override void PreDrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

SetDefaultParameters()

Sets the default parameters (called at constructor time and if Reset() is called)

protected override void SetDefaultParameters()

UpdateParameters()

Updates the effect Parameters from properties defined in this instance. See remarks.

protected virtual void UpdateParameters()