class Source
Class for making settings per light source.
| id | The light source number. Type is u8. Set a value between 0 and -7. |
|
|---|---|---|
| isEnableTwoSideDiffuse | Light can be made to strike both sides by setting this to true. Type is bool. |
|
| isEnableGeomFactor0 | Sets whether to use geometric factor 0. Type is bool. |
|
| isEnableGeomFactor1 | Sets whether to use geometric factor 1. Type is bool. |
|
| diffuseR | Red component setting for diffuse light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| diffuseG | Green component setting for diffuse light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| diffuseB | Blue component setting for diffuse light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| ambientR | Red component setting for ambient light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| ambientG | Green component setting for ambient light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| ambientB | Blue component setting for ambient light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular0R | Red component setting for specular light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular0G | Green component setting for specular light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular0B | Blue component setting for specular light. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular1R | Red component setting for specular 1. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular1G | Green component setting for specular 1. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
|
| specular1B | Blue component setting for specular 1. Type is u8. Values in the range [0.f, 1.f] are mapped to [0, 255] and then set. |
SetPosition
|
Configures the light position. Converts the set value to a 16-bit floating point number used to set the rendering command and stores it. | |
|---|---|---|
| SetSpotDirection | Sets the spotlight light direction. Converts the set value to a 13-bit fixed point number used to set the rendering command and stores it. | |
| SetDistAttnScaleBias | Sets the scale and bias for distance attenuation. Converts the set value to a 20-bit floating point number used to set the rendering command and stores it. | |
| SetDistAttnStartEnd | Sets scale and bias for distance attenuation by specifying an attenuation start distance and attenuation end distance. Converts the set values to scale and bias values, and then converts them to 20-bit floating point numbers used to set the render command and stores them. | |
MakeCommand
|
Generates a command for source lights based on information already set. | |
| Source | Initalizes using initial values. |
CONFIDENTIAL