From 89db920165f1e6d5cc80097386474620f3fd10d0 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 5 Jul 2023 20:10:53 -0400 Subject: [PATCH] Merge pull request #7561 from Calinou/spatial-shader-light-color-pi-multiplier Document `LIGHT_COLOR` being multiplied by `PI` in Spatial shader --- tutorials/shaders/shader_reference/spatial_shader.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 995196cb0..0a2b747fb 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/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``. |