@@ -342,6 +342,69 @@ and add two extra parameters:
342342- **Angle: ** The aperture angle of the light.
343343- **Angle Attenuation: ** The cone attenuation, which helps soften the cone borders.
344344
345+ Area light
346+ ----------
347+
348+ Sometimes, you want lighting to come from a large area instead of a single
349+ point. Area lights are useful for simulating soft, diffuse lighting, such as
350+ light coming from a window or a lit billboard. This type of light is expensive
351+ to render in real-time, so it should be used sparingly, especially when shadows
352+ are enabled.
353+
354+ Godot provides the :ref: `class_AreaLight3D ` node for this purpose, which is a
355+ type of light that emits light from a rectangular area. This node only emits
356+ light and has no other visual representation in the scene. The screenshots below
357+ use a :ref: `class_Sprite3D ` node as a child of the area light for visualization
358+ purposes.
359+
360+ Area lights can also cast shadows, with variable penumbra simulated using
361+ :ref: `PCSS <doc_lights_and_shadows_pcss_recommendations >` by default. This
362+ effect can be quite demanding, so it can be turned off by setting the light's
363+ **Size ** to ``0.0 ``.
364+
365+ .. image :: img/lights_and_shadows_area_example.webp
366+
367+ .. note ::
368+
369+ Shadows in area lights are an approximation, and may appear to be distorted
370+ at the edges. To get a better result, make sure the meshes in the light's
371+ range are sufficiently subdivided.
372+
373+ Area lights emit light in a rectangular area defined by the **Area > Size **
374+ property (not to be confused with the generic Light3D **Size ** property). To get
375+ a physically accurate result, you should resize this area to match the size of
376+ the real-life light source you are trying to simulate. For example, if you are
377+ simulating a 1-meter neon tube that is 10 centimeters wide, set the area
378+ size to ``(1, 0.1) `` and adjust the energy accordingly.
379+
380+ By default, the light's energy is normalized: the larger the area, the weaker
381+ the light. This allows you to change the area size without needing to adjust the
382+ energy to compensate, which is useful for animation. You can disable this
383+ behavior by unchecking **Area > Normalize Energy ** if you want the energy to be
384+ independent of the area size.
385+
386+ The rectangular area can optionally be textured. This can be effectively used to
387+ change the light's shape into any 2D shape, or tint it in different colors. The
388+ texture's alpha channel is treated as black (no light coming through). The area
389+ light's texture will be visible in reflections according to the surface's
390+ roughness. This behavior is different from omni/spot projectors, as it does not
391+ project the texture directly onto all diffuse lighting.
392+
393+ .. image :: img/lights_and_shadows_area_texture.webp
394+
395+ .. note ::
396+
397+ Changing the area light's texture at runtime can be expensive, especially if
398+ the texture is large.
399+
400+ To reduce the performance impact of switching textures at runtime, make sure
401+ each dimension of an area texture is either a multiple of 128 pixels, or a
402+ power of two. This removes the need for a scaling pass, which slows down
403+ texture changes. The textures don't necessarily have to be square to be
404+ optimal. Examples of optimal texture sizes include 32×64, 128×128, and
405+ 256×384.
406+
407+
345408Spot shadow mapping
346409~~~~~~~~~~~~~~~~~~~
347410
0 commit comments