This is the documentation for Enlighten.
In order to support view-dependent effects such as specular reflections, Enlighten supports directionality in the baking API. You can use three different methods:
SetOutputIsIntensity() method in IBakeInputProperties or setting outputIsIntensity in the bake parameters when using the HLBS.If only a low-frequency normal texture and no specularity is used, then baking the result of the normal map into the light map is an option with no runtime costs. Enlighten will only bake light maps if enabled in the materials file by setting the useForBaking attribute of the normal texture to true. For the low-level API, the normal texture is used if it is set on the material passed into the Enlighten::IBakeInputSystem::AddGeometry.
Directional lightmaps (lightmaps using other lighting normals like the Half-Life 2 basis) are widely used and supported by other baking solutions and game engines. As such, this method should work well as a drop-in replacement.
To supply the extra lighting normals, an Enlighten::IBakeInputGeometryLightingNormals object is supplied to Enlighten::IBakeInputSystem::AddGeometry. The object contains a lighting normal object Enlighten::IBakeInputMeshLightingNormals for each mesh in the geometry.
In order to model any arbitrary surface in three dimensions according to the discussion above, a minimum of three vectors is required per pixel. By selecting three mutually orthonormal vectors you obtain a minimum basis set; that is, a maximally-efficient set of directions using this minimum number of vectors (see http://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf, page 10). If you specify more directions, you can obtain greater fidelity for off-axis geometry; however, if you use the High Level Build System, the Half-Life 2 basis is enforced.
When the enableDirectionality attribute has been set, the High Level Build System automatically uses the normal and tangents stored with the geometry to create a Half-Life 2 basis for each of the vertices. The HLBS creates four baked outputs for each of the direct and indirect lighting cases; one for the normal direction and one for each of the three Half-Life 2 vectors in the basis.
Storing the dominant lighting direction in addition to the irradiance lightmap is a more memory effective solution then the directional light maps. It also permits seamlessly switching between the runtime and baked solution. On the other hand, baked directional irradiance isn't as effective as directional light maps at modelling light from different directions with different colours.
The directional irradiance texture can be retrieved from the Enlighten::IBakeOutputSystemIndirect and Enlighten::IBakeOutputSystemDirect objects using the Enlighten::IBakeOutputSystemIndirect::GetDirectionalIrradianceTexture and Enlighten::IBakeOutputSystemDirect::GetDirectionalIrradianceTexture methods.
The extra directional information is always generated and is output in the same place as the irradiance textures. The texture filename consists of the lightmap name, plus a _Dir suffix.