Class Effect
Abstract base class for ShaderEffect, SurfaceEffectBase and ComputeEffect.
Inherited Members
Namespace: Fusee.Engine.Core.Effects
Assembly: Fusee.Engine.Core.dll
Syntax
public abstract class Effect : SceneComponent, IComponent, IDisposable
Properties
EffectChanged
ShaderEffect event notifies observing ShaderEffectManager about property changes and the ShaderEffects's disposal.
Declaration
public EventHandler<EffectManagerEventArgs> EffectChanged { get; }
Property Value
| Type | Description |
|---|---|
| System.EventHandler<EffectManagerEventArgs> |
EffectManagerEventArgs
Event arguments that are used in the Fusee.Engine.Core.EffectManager.
Declaration
public EffectManagerEventArgs EffectManagerEventArgs { get; }
Property Value
| Type | Description |
|---|---|
| EffectManagerEventArgs |
RendererStates
The renderer states that are applied for this effect, e.g. the blend and alpha mode.
Declaration
public RenderStateSet RendererStates { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderStateSet |
SessionUniqueIdentifier
SessionUniqueIdentifier is used to verify a Mesh's uniqueness in the current session.
Declaration
public Suid SessionUniqueIdentifier { get; }
Property Value
| Type | Description |
|---|---|
| Suid |
UniformParameters
Collection of all uniform parameters of this effect. See IFxParamDeclaration.
Declaration
public Dictionary<int, IFxParamDeclaration> UniformParameters { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.Int32, IFxParamDeclaration> |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. |
Equals(Effect)
Determines whether two Effect instances are equal.
Declaration
public bool Equals(Effect p)
Parameters
| Type | Name | Description |
|---|---|---|
| Effect | p | The other Effect. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Equals(Object)
Determines whether two Effect instances are equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | The other Effect. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Finalize()
Destructor calls Dispose() in order to fire MeshChanged event.
Declaration
protected void Finalize()
GetFxParam<T>(String)
Returns the value of a given shader effect variable
Declaration
public T GetFxParam<T>(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the uniform variable |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A hash code for the current object. |
Overrides
SetFxParam<T>(Int32, T)
Set effect parameter
Declaration
public void SetFxParam<T>(int hash, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | hash | Hash of the uniform variable. Retrieved by name.GetHashCode(). |
| T | value | Value of the uniform variable |
Type Parameters
| Name | Description |
|---|---|
| T |
SetFxParam<T>(String, T)
Set effect parameter
Declaration
public void SetFxParam<T>(string name, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Name of the uniform variable |
| T | value | Value of the uniform variable |
Type Parameters
| Name | Description |
|---|---|
| T |