nn::gd::CTR::Light Classclass Light
This class manages settings for each of eight light sources.
LightingStage::ligh variable, there is no need to create a new Light object.
| SourceType | This is a fragment light type enum value. |
|
|---|---|---|
| LightLookUpTableUploadId | This is a fragment light lookup table enum value. It can be independently set for each separate light. |
| EnableLight | Enables or disables each light source. | |
|---|---|---|
| SetColorAmbient | Sets the ambient color of each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| SetColorDiffuse | Sets the diffuse color of each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| SetColorSpecular0 | Sets Specular Color 0 for each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| SetColorSpecular1 | Sets Specular Color 1 for each light source. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
SetPosition
|
This is an immediate function. It sets the light direction. SOURCE_TYPE_PUNCTUAL must be specified for a light type set using SetLightType. (The resulting command from the immediate function is inserted into the command buffer.) Note: This function sets the same registers as the Light::SetDirection function. |
|
| SetDirection | This is an immediate function. Sets the light direction. SOURCE_TYPE_DIRECTIONAL must be specified for the light type to be set using SetLightType. (The resulting command from the immediate function is inserted into the command buffer.) Note: This function sets the same registers as the Light::SetDirection function. |
|
| SetSpotDirection | Sets the spotlight light direction. SOURCE_TYPE_PUNCTUAL must be specified for the light type to be set using SetLightType. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) |
|
| SetLightType | Configures the light type. (SOURCE_TYPE_DIRECTIONAL or SOURCE_TYPE_PUNCTUAL) This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) |
|
| SetDistanceAttenuationScaleBias | Sets the scale and bias for input values to the distance attenuation lookup table. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| EnableTwoSideDiffuse | Sets single-side or double-side lighting. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| EnableGeomFactor0 | Sets whether lights will use Geometric Factor 0. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| EnableGeomFactor1 | Sets whether lights will use Geometric Factor 1. This function is an immediate function. (The immediate function directly generates commands and inserts them into the command buffer.) | |
| EnableSpotLight | Enables or disables spotlights. A lookup table is used if enabled. SOURCE_TYPE_PUNCTUAL must be specified for a light type set using SetLightType. |
|
| EnableDistanceAttenuation | Enables or disables distance attenuation of lights. A lookup table is used if enabled. | |
| EnableShadowed | Sets the element for which shadow is to be adjusted. | |
| UploadLookUpTableFloat | Sets the lighting lookup table. The floating point value you specify is converted into fixed point data by this function and then sent to the GPU. | |
| UploadLookUpTableNative | Sets the lighting lookup table. The data used by this function has already been converted from floating point to fixed point. |
CONFIDENTIAL