Browse Source

Clarify issue with GLES2 renderer (#6100)

* Clarify issue with GLES2 renderer

See #6098

* Apply suggestions from code review

Co-authored-by: Clay John <[email protected]>
Co-authored-by: Hugo Locurcio <[email protected]>
Cameron Reikes 3 years ago
parent
commit
02db4f3cad
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tutorials/shaders/shader_reference/spatial_shader.rst

+ 4 - 0
tutorials/shaders/shader_reference/spatial_shader.rst

@@ -324,6 +324,10 @@ 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::
+
+    In GLES2, lights will always be added together even if you override ``DIFFUSE_LIGHT`` using ``=``. This is due to lighting being computed in multiple passes (one for each light), unlike GLES3.
+
 .. warning::
 
     The ``light()`` function won't be run if the ``vertex_lighting`` render mode