Class EffectFromFile
Effect from compiled shader files.
Inherited Members
Namespace: Evergine.Framework.Graphics.Effects
Assembly: Evergine.Framework.dll
Syntax
public class EffectFromFile : Effect, ILoadable, IDependencyObject
Constructors
EffectFromFile(GraphicsContext, EffectAssets)
Initializes a new instance of the EffectFromFile class.
Declaration
public EffectFromFile(GraphicsContext graphicsContext, EffectAssets asset)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | Graphics context. |
EffectAssets | asset | Shader asset with precomputed data. |
EffectFromFile(GraphicsContext, EffectAssets, string, string[], bool)
Initializes a new instance of the EffectFromFile class.
Declaration
public EffectFromFile(GraphicsContext graphicsContext, EffectAssets asset, string passName, string[] activeDirectives, bool lazyInitialization = false)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | Graphics context. |
EffectAssets | asset | Shader assets with precomputed asset. |
string | passName | Pass name. |
string[] | activeDirectives | Active directives. |
bool | lazyInitialization | Lazy initialization. Creates shader instance during initialization or on-demand. |
Fields
asset
The shader asset.
Declaration
protected EffectAssets asset
Field Value
Type | Description |
---|---|
EffectAssets |
Properties
EffectType
Gets the effect type.
Declaration
public override ShaderAnalyzer.EffectTypes EffectType { get; }
Property Value
Type | Description |
---|---|
ShaderAnalyzer.EffectTypes |
Overrides
Methods
GetEffectTechnique(string, string[])
Gets the Effect Technique with a specific directives group.
Declaration
public override EffectTechnique GetEffectTechnique(string passName, string[] activeDirectives)
Parameters
Type | Name | Description |
---|---|---|
string | passName | The pass name. |
string[] | activeDirectives | The active directives. |
Returns
Type | Description |
---|---|
EffectTechnique | The effect technique. |
Overrides
IsPassRequiredWithDirectives(string, string[])
Gets if the pass is required with current active directives.
Declaration
public override bool IsPassRequiredWithDirectives(string passName, string[] activeDirectives)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Pass name. |
string[] | activeDirectives | Active directives. |
Returns
Type | Description |
---|---|
bool | Whether the pass is required. |