Custom scriptable class for lights using RenderMan Shader Language (RSL) Shaders.
Inherits :
DAZ Script | |
---|---|
LightType | { NullLight, AmbientLight, PointLight, DistantLight, SpotLight } |
DAZ Script |
---|
DzShaderLight () |
DzShaderLight ( String definitionFile, LightType type ) |
DAZ Script | |
---|---|
Boolean | addShader ( DzRSLShader shader ) |
DzColorProperty | getColorControl () |
String | getDefinitionFile () |
Number | getIntensity () |
DzFloatProperty | getIntensityControl () |
String | getLightName () |
LightType | getLightType () |
Number | getNumShaders () |
DzRSLShader | getShader ( Number index ) |
String | getShadowMapPath () |
Boolean | removeShader ( DzRSLShader shader ) |
void | setDefinitionFile ( String definitionFile, Boolean doOverride=false, Boolean runScript=true ) |
void | setLightName ( String name ) |
void | setLightType ( LightType type ) |
void | setUseLocalShaderSpace ( Boolean onOff ) |
Boolean | usesLocalShaderSpace () |
This class provides a DzLight derived object with creator-defined properties that will be passed to the RSL Shader at render-time. By default, the light only has two properties - Color and Intensity. The values of these properties are not sent to the shader by default, nor are any attributes set representing the value of these properties. Unless put to use via DzRSLShader, these properties are purely for OpenGL purposes. These properties are not mappable by default, but can be made so by using DzRSLShader::addMapProperty() or DzRSLShader::addMappableProperty(). All other properties for the light must be added using DzRSLShader in order to be used to pass values as arguments to the shader. Properties for the light that will be used by the render-time scripts to set attributes must be added via DzElement::addProperty().
Enumerated values for the light type
See Also:
Default Constructor.
DzShaderLight( String definitionFile, LightType type )
Parameter(s):
See Also:
Boolean : addShader( DzRSLShader shader )
Adds shader to this light's internal list of shaders and sets shader 's owner to this light.
Return Value:
true
if shader is successfully added to the list (e.g. does not already exist), otherwise false
.DzColorProperty : getColorControl()
Return Value:
Return Value:
Number : getIntensity()
Return Value:
DzFloatProperty : getIntensityControl()
Return Value:
String : getLightName()
Return Value:
Return Value:
Number : getNumShaders()
Return Value:
DzRSLShader : getShader( Number index )
Return Value:
Return Value:
Boolean : removeShader( DzRSLShader shader )
Removes shader
from this light's internal list of shaders.
Return Value:
true
if shader
is successfully removed from the list, otherwise false
.void : setDefinitionFile( String definitionFile, Boolean doOverride=false, Boolean runScript=true )
Sets the relative path of the [DAZ Script] file that builds this light's property list.
Parameter(s):
Attention:
Light
- referring to the current DzShaderLight being rendered, exists for the duration of definitionFile. Referencing this variable from outside definitionFile will result in an error.void : setLightName( String name )
Sets the internal name of the light; this is not the same as the QObject::name property. By default, this is “Custom”.
void : setLightType( LightType type )
Sets the type of a light. A light's type determines the OpenGL representation.
void : setUseLocalShaderSpace( Boolean onOff )
Sets a flag so that transforms are applied to the coordinate space that the light is in, greatly simplifying shader math.
Boolean : usesLocalShaderSpace()
Return Value:
false
by default