light
Tag: light
Parent tag: lights
Attributes: name
– string
Child tags:
POSITION
– vec4 (default 0,0,0,1)DIRECTION
– vec4 (default 0,0,1,0)COLOR
– vec4 (default 1,1,1,1)AMBIENT
– vec4 (default 0.2,0.2,0.2,1.0)SPECULAR
– vec4 (default 0,0,0,1)SPOT_EXPONENT
– float (default 0.0)SPOT_CUTOFF
– float (default 180.0)CONSTANT_ATT
– float (default 1.0)LINEAR_ATT
– float (default 0.0)QUADRATIC_ATT
– float (default 0.0)ENABLED
– bool, true if turned on (default true)
This tag defines a light with attributes similar to those in “deprecated” OpenGL. Note however, that these values have no semantic meaning for Nau3D. Defining a light allows your shader to use its values, but it is up to you to define its semantics.
Example
<light name="Sun"> <DIRECTION x="1.0" y="-0.5" z="-2" /> <COLOR r="0.9" g="0.9" b="0.9" /> <AMBIENT r="0.5" g="0.0" b="0.0" /> </light>