Document that light() functions aren't run if vertex shading is forced

See https://github.com/godotengine/godot/issues/39513.
This commit is contained in:
Hugo Locurcio
2020-06-13 19:07:40 +02:00
parent 84d2b1e848
commit 0d6f2e8703
2 changed files with 15 additions and 1 deletions

View File

@@ -298,6 +298,13 @@ Below is an example of a custom light function using a Lambertian lighting model
If you want the lights to add together, add the light contribution to ``DIFFUSE_LIGHT`` using ``+=``, rather than overwriting it.
.. warning::
The ``light()`` function won't be run if the ``vertex_lighting`` render mode
is enabled, or if
**Rendering > Quality > Shading > Force Vertex Shading** is enabled in the
Project Settings. (It's enabled by default on mobile platforms.)
+-----------------------------------+-----------------------------------------------------+
| Built-in | Description |
+===================================+=====================================================+

View File

@@ -90,7 +90,14 @@ between the vertices to provide the values for the ``fragment()`` function.
The ``light()`` function runs for every pixel and for every light. It takes variables from the
``fragment()`` function and from previous runs of itself.
For more information about how shaders operate specifically in Godot see the :ref:`Shaders <doc_shaders>` doc.
For more information about how shaders operate specifically in Godot, see the :ref:`Shaders <doc_shaders>` doc.
.. warning::
The ``light()`` function won't be run if the ``vertex_lighting`` render mode
is enabled, or if
**Rendering > Quality > Shading > Force Vertex Shading** is enabled in the
Project Settings. (It's enabled by default on mobile platforms.)
Technical overview
------------------