Click or drag to resize

MaterialLightComponent Class

Light definition. If contained within a node, the node's (and potentially child node's) light is rendered with the speicified lightsetup within the ApplyLightString ApplyLight Method.
Inheritance Hierarchy

Namespace:  Fusee.Serialization
Assembly:  Fusee.Serialization (in Fusee.Serialization.dll) Version: 0.7.0.0 (0.7.0.0)
Syntax
C#
public class MaterialLightComponent : MaterialComponent

The MaterialLightComponent type exposes the following members.

Constructors
  NameDescription
Public methodMaterialLightComponent
Initializes a new instance of the MaterialLightComponent class
Top
Properties
  NameDescription
Public propertyHasBump
Gets a value indicating whether this instance has a bump channel.
(Inherited from MaterialComponent.)
Public propertyHasDiffuse
Gets a value indicating whether this instance has a diffuse channel.
(Inherited from MaterialComponent.)
Public propertyHasEmissive
Gets a value indicating whether this instance has an emissive channel.
(Inherited from MaterialComponent.)
Public propertyHasSpecular
Gets a value indicating whether this instance has a specular channel.
(Inherited from MaterialComponent.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldApplyLightString
This string is converted and used for the light calculation during the render traversal.

Make sure that this is a method with the following signature: vec3 ApplyLight(vec3 position, vec3 intensities, vec3 coneDirection, float attenuation, float ambientCoefficient, float coneAngle, int lightType)

Within this method you can use plain GLSL, as well as FUSEE's builtin shader attributes (e.g. FUSEE_ITMV, ...), as long as they were specified from ShaderCodeBuilder during runtime.

Make sure you return your calculated light as vec3.

Remarks
The ApplyLight method signature is going to change within the next month! (11/2016)
Public fieldBump
The bump channel.
(Inherited from MaterialComponent.)
Public fieldDiffuse
The diffuse channel.
(Inherited from MaterialComponent.)
Public fieldEmissive
The emissive channel.
(Inherited from MaterialComponent.)
Public fieldFragmentShaderString
This string is converted and used for the calculation of the fragment shader during the render traversal.
Remarks
Not yet implemented!
Public fieldName
The name of this component.
(Inherited from SceneComponentContainer.)
Public fieldSpecular
The specular channel.
(Inherited from MaterialComponent.)
Top
See Also