Skip to content

Commit

Permalink
Update 3D lights and shadows documentation for 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Calinou committed Feb 24, 2023
1 parent c8d0af5 commit f89ffb2
Show file tree
Hide file tree
Showing 29 changed files with 359 additions and 113 deletions.
4 changes: 4 additions & 0 deletions tutorials/3d/3d_antialiasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Note that alpha antialiasing is not used here:

.. image:: img/antialiasing_msaa_8x.webp

.. _doc_3d_antialiasing_taa:

Temporal antialiasing (TAA)
---------------------------

Expand Down Expand Up @@ -103,6 +105,8 @@ Comparison between no antialiasing (left) and TAA (right):

.. image:: img/antialiasing_taa.webp

.. _doc_3d_antialiasing_fxaa:

Fast approximate antialiasing (FXAA)
------------------------------------

Expand Down
Binary file added tutorials/3d/img/lights_and_shadows_acne.webp
Binary file not shown.
Binary file added tutorials/3d/img/lights_and_shadows_blur.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tutorials/3d/img/lights_and_shadows_pcss.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed tutorials/3d/img/pssm_explained.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_atlas.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_bias.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_blocky.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_contact.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_omni_dp_cm.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_pcf1.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_pcf2.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_pssm.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_quadrants.png
Binary file not shown.
Binary file removed tutorials/3d/img/shadow_quadrants2.png
Binary file not shown.
23 changes: 21 additions & 2 deletions tutorials/3d/introduction_to_3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,24 @@ each viewport:
Lights
------

There is no limitation on the number of lights, nor of types of lights, in
Godot. As many as desired can be added (as long as performance allows).
When using the Forward Plus renderer, there is no limitation on the number of
lights you can use in a scene. This is made by possible by using a *clustering*
approach for real-time lighting. As many lights as desired can be added (as long
as performance allows).

When using the Forward Mobile renderer, there is a limitation of 8 OmniLights +
8 SpotLights per mesh resource. Additionally, only one DirectionalLight can be
visible at a time.

When using the Compatibility renderer, only one OmniLight and one SpotLight can
be rendered with shadows enabled per mesh resource. Additionally, only one
DirectionalLight can be visible at a time. Up to 32 OmniLights + 32 SpotLights
*without shadows* can be rendered per mesh resource. This limit can be increased
in the Project Settings at the cost of performance and longer shader compilation
times. The limit can also be decreased to reduce shader compilation times and
improve performance slightly.

If you need to render more lights than possible in a given rendering backend,
consider using baked :ref:`doc_baked_lightmaps` with lights' bake mode set to
**Static**. This allows lights to be fully baked, which also makes them much
faster to render.
445 changes: 334 additions & 111 deletions tutorials/3d/lights_and_shadows.rst

Large diffs are not rendered by default.

0 comments on commit f89ffb2

Please sign in to comment.