ReadonlylightingShould this GameObject use lighting?
This flag is used to set up WebGL shaders for rendering.
Should this GameObject use self-shadowing?
Self-shadowing is only enabled if lighting is enabled.
The game config option render.selfShadow is used if this is not a boolean.
This flag is used to set up WebGL shaders for rendering.
Sets whether this GameObject should use lighting.
true to use lighting, or false to disable it.
Sets whether this GameObject should use self-shadowing.
Self-shadowing is only enabled if lighting is also enabled.
Optionalenabled: booleantrue to use self-shadowing, false to disable it, null to use the game default from config.render.selfShadow, or undefined to keep the setting.
Optionalpenumbra: numberThe penumbra value for the shadow. Lower is sharper but more jagged. Default is 0.5.
OptionaldiffuseFlatThreshold: numberThe texture brightness threshold at which the diffuse lighting will be considered flat. Range is 0-1. Default is 1/3.
Provides methods for enabling lighting effects on a Game Object.
This should only be applied to GameObjects that have RenderNodes.