LightDataGI
The interop structure to pass light information to the light baking backends. There are helper structures for Directional, Point, Spot and Rectangle lights to correctly initialize this structure.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.Experimental.GlobalIllumination
- Assembly: UnityEngine.CoreModule
public struct LightDataGI
Fields
Value | Description |
|---|---|
| color | The color of the light. |
| coneAngle | The cone angle for spot lights. |
| cookieScale | The uniform scale factor for downscaling cookies during lightmapping. Can be used as an optimization when full resolution cookies are not needed for indirect lighting. |
| cookieTextureEntityId | The cookie texture's entityId projected by the light. |
| entityId | The light's entityId. |
| falloff | The falloff model to use for baking point and spot lights. |
| indirectColor | The indirect color of the light. |
| indirectMultiplier | The multiplier for indirect light intensity. Corresponds to Light.bounceIntensity. |
| innerConeAngle | The inner cone angle for spot lights. |
| mode | The lightmap mode for the light. |
| orientation | The orientation of the light. |
| position | The position of the light. |
| range | The range of the light. Unused for directional lights. |
| shadow | Set to 1 for shadow casting lights, 0 otherwise. |
| shape0 | The light's sphere radius for point and spot lights, or the width for rectangle lights. |
| shape1 | The height for rectangle lights. |
| type | The type of the light. |
Methods
Method | Description |
|---|---|
| Init | Initialize the struct with the parameters from the given light type. |
| InitNoBake | Initialize a light so that the baking backends ignore it. |