Related topics include:
For an overview and a list of lookup tables, see Lookup Tables.
Each entry of a light lookup table holds a light source definition.
------------------------------------------------------------------------------------------------------------
Table Value Mask Description Fallback PEX
------------------------------------------------------------------------------------------------------------
PEXLUTVLightType 5.0
light type (imp-dep)
PEXLUTVLightDirection 5.0
direction vector (imp-dep)
PEXLUTVLightPosition 5.0
position (imp-dep)
PEXLUTVLightConcentration 5.0
concentration (imp-dep)
PEXLUTVLightSpreadAngle 5.0
spread angle (imp-dep)
PEXLUTVLightConstantAttenFactor 5.0
constant attenuation factor (imp-dep)
PEXLUTVLightLinearAttenFactor 5.0
linear attenuation factor (imp-dep)
PEXLUTVLightColor 5.0
light color (imp-dep)
PEXLUTVLightConcentrationClampRegion(a) 5.2
concentration clamp region (imp-dep)
PEXLUTVLightQuadraticAttenFactor(a) 5.2
quadratic attenuation factor (imp-dep)
PEXLUTVLightAll5_1 (selects entire table entry except 5.2 items) 5.0
PEXLUTVLightAll5_2 (selects entire table entry) 5.2
------------------------------------------------------------------------------------------------------------
PEXlib defines the following values:
Not every light type requires that you define all of the light table fields. The implementation ignores fields that are not needed for the definition of a particular light.
Inquire ConcentrationClampSupported with request PEXGetImpDepConstants to determine whether the concentration clamp region is actually applied in the reflectance calculation.
Applies to the definition of light type PEXLightWCSpot.
Inquire QuadraticAttenSupported with request PEXGetImpDepConstants to determine whether the quadratic attenuation factor is actually used in the reflectance calculation.
Applies to the definition of light types PEXLightWCPoint and PEXLightWCSpot.
The reflectance equations are implementation-dependent.
The implementation accesses the light table during rendering whenever the pipeline state's light source state is non-empty. The light source state selects entries of the light table which then represent the enabled lights.
Direct color components that are out of range are treated in an implementation-dependent way. If you specify an unsupported color type, then the implementation issues a BadPEXColorType error. If the color type is PEXColorTypeIndexed and the color index is 65535, then the implementation issues a BadValue error. If you specify an unsupported light type or specify a direction vector of length zero, then the implementation issues a BadValue error.
Valid light table indices are in the range [1, 65535]. There is not a fallback entry for the light table.