AndroidLightsController
A class in Root.Township, Alta.Lighting.
Client lights controller on Android: packs up to 8 lights into a global shader array, and uses baked fake light meshes for lights beyond the nearest 8.
- Listed in World, chunks and saving
- Inherits or implements
BaseLightsController - Nested types
SortedLight
Constructors
| Member | What it is |
|---|---|
AndroidLightsController() | Creates an AndroidLightsController with default values. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private static readonly int _CustomLight | Shader property ID of the global light array. |
private HashSet<PlatformLight> buffer | Lights that didn't make the nearest 8, which get fake lights. |
private Vector4 empty | Colour used for unused slots. |
private Vector4[] shaderArray | The 16 vectors sent to the shader: positions, attenuation and colours for 8 lights. |
private LightSorter<AndroidLightsController.SortedLight> sorter | Sorts lights by distance from the head. |