Class ShaderEffect
A ShaderEffect contains a string for each, the vertex, fragment and geometry shader and a set of render states. Use this if you want to write the shader code on your own. The values of uniform variables you defined (UniformParameters) can be set using SetFxParam<T>(Int32, T) or SetFxParam<T>(String, T).
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Core.Effects
Assembly: Fusee.Engine.Core.dll
Syntax
public class ShaderEffect : Effect, IComponent, IDisposable
Constructors
ShaderEffect(IEnumerable<IFxParamDeclaration>, RenderStateSet, String, String, String)
The constructor to create a shader effect.
Declaration
public ShaderEffect(IEnumerable<IFxParamDeclaration> effectParameters, RenderStateSet rendererStates, string vs, string ps, string gs = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IFxParamDeclaration> | effectParameters | The list of (uniform) parameters. The concrete type of the object also indicates the parameter's type. |
RenderStateSet | rendererStates | |
System.String | vs | |
System.String | ps | |
System.String | gs |
Remarks
Make sure to insert all uniform variable in "effectParameters" that are declared in the shader code.
Properties
GeometryShaderSrc
The Geometry shader code.
Declaration
public string GeometryShaderSrc { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
PixelShaderSrc
The Fragment shader code.
Declaration
public string PixelShaderSrc { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
VertexShaderSrc
The Vertex shader code.
Declaration
public string VertexShaderSrc { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
Implements
System.IDisposable