# Light source

The supported real-time light types are parallel light, point light and spot light. Based on performance considerations, currently the maximum number of real-time light sources for each rendering object per frame is 4.

# point Light

A point light source is located at a point in space and emits light evenly in all directions around it. Based on the laws of physics, the light intensity is inversely proportional to the square of the distance from the light source. Point light sources are often used in torches, household lamps, lighting during special effects explosions, etc. The intensity, color and effective range of the point light source can be set in the property panel.

# Spotlight

The spotlight is also located at a point in space. The light not only has an attenuation range, but also an angle attenuation. The greater the angle with the light emitting direction of the light source, the weaker the light intensity. Spotlights are often used to simulate flashlights, car lighting, etc. The intensity, color, effective range and effective angle of the spotlight can be set in the property panel.

# Directional light

Directional light is often used to simulate sunlight, which is regarded as being placed at an infinite distance, all its rays are facing the same direction, and there is no attenuation. In the properties panel, you can set the intensity, color, and corresponding shadow intensity of the spotlight.

# Use lights

After understanding each type of light source, we can start add light source