Table of Contents

Class DynamicEffectInstance

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

Represents an instance of an Effect that can be dynamically compiled in different permutations according to the permutation parameters set in its Parameters.

public class DynamicEffectInstance : EffectInstance, IDisposable, IReferencable
Inheritance
object
DynamicEffectInstance
Implements
Inherited Members
Extension Methods

Constructors

DynamicEffectInstance(string, ParameterCollection?)

Initializes a new instance of the DynamicEffectInstance class with the specified effect name and parameters.

public DynamicEffectInstance(string effectName, ParameterCollection? parameters = null)

Parameters

effectName string

The name of the Effect.

parameters ParameterCollection

Properties

EffectCompilerParameters

Gets the parameters used when compiling the Effect used by this instance.

public ref EffectCompilerParameters EffectCompilerParameters { get; }

Property Value

EffectCompilerParameters

EffectName

Gets or sets the name of the Effect to be used by this instance.

public string EffectName { get; set; }

Property Value

string

Methods

ChooseEffect()

Selects and compiles the appropriate Effect based on the current parameters.

protected override void ChooseEffect()

Remarks

This method updates the Effect by recompiling and reloading it with the current set of permutation parameters.

Initialize(IServiceRegistry)

Initializes the Effect instance.

public void Initialize(IServiceRegistry services)

Parameters

services IServiceRegistry

The service registry used to obtain necessary services for initialization.

Remarks

This method retrieves the EffectSystem service from the provided service registry.

Exceptions

ArgumentNullException

services is null.

ServiceNotFoundException

The required service EffectSystem was not found.