Class EffectFromCode
Effect from shader code.
Inherited Members
Namespace: Evergine.Framework.Graphics.Effects
Assembly: Evergine.Framework.dll
Syntax
public class EffectFromCode : Effect, ILoadable, IDisposable, IDependencyObject
Constructors
EffectFromCode(GraphicsContext, string)
Initializes a new instance of the EffectFromCode class.
Declaration
public EffectFromCode(GraphicsContext graphicsContext, string shaderSource)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | Graphics context. |
string | shaderSource | Shader source. |
EffectFromCode(GraphicsContext, string, string, string[], bool)
Initializes a new instance of the EffectFromCode class.
Declaration
public EffectFromCode(GraphicsContext graphicsContext, string shaderSource, string passName = null, string[] activeDirectives = null, bool lazyInitialization = false)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | graphicsContext | Graphics context. |
string | shaderSource | Shader source. |
string | passName | Active pass. |
string[] | activeDirectives | Active directives. |
bool | lazyInitialization | Lazy initialization. Compile shaders in the initialization or on-demand. |
Fields
analyzer
The analyzer.
Declaration
protected ShaderAnalyzer analyzer
Field Value
Type | Description |
---|---|
ShaderAnalyzer |
compiler
The compiler.
Declaration
protected ShaderCompiler compiler
Field Value
Type | Description |
---|---|
ShaderCompiler |
shaderSource
The shader source.
Declaration
protected string shaderSource
Field Value
Type | Description |
---|---|
string |
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 Effect Technique with a specific directives group.
Declaration
public override EffectTechnique GetEffectTechnique(string passName, string[] activeDirectives)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Pass name. |
string[] | activeDirectives | Active directives. |
Returns
Type | Description |
---|---|
EffectTechnique | 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 | If the pass is required or not. |
Overrides
SelectPass(string)
Selects the pass.
Declaration
protected PassSection SelectPass(string passName)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Name of the pass. |
Returns
Type | Description |
---|---|
PassSection | The selected pass section. |