瀏覽代碼

Merge pull request #7561 from Calinou/spatial-shader-light-color-pi-multiplier

Document `LIGHT_COLOR` being multiplied by `PI` in Spatial shader
Matthew 2 年之前
父節點
當前提交
dfb7d7314e
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      tutorials/shaders/shader_reference/spatial_shader.rst

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

@@ -441,7 +441,10 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_
 +-----------------------------------+----------------------------------------------------+
 | in vec3 **LIGHT**                 | Light Vector, in view space.                       |
 +-----------------------------------+----------------------------------------------------+
-| in vec3 **LIGHT_COLOR**           | Color of light multiplied by energy.               |
+| in vec3 **LIGHT_COLOR**           | Color of light multiplied by ``energy * PI``.      |
+|                                   | The ``PI`` multiplication is present because       |
+|                                   | physically-based lighting models include a         |
+|                                   | division by ``PI``.                                |
 +-----------------------------------+----------------------------------------------------+
 | in float **SPECULAR_AMOUNT**      | 2.0 * ``light_specular`` property for              |
 |                                   | ``OmniLight3D`` and ``SpotLight3D``.               |