From 34e4335d233b4a9f95e07d681f42f70abaa10dc1 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 27 Jun 2023 08:23:55 +0200 Subject: [PATCH] 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 2c43c97e859..dcc5f63a26d 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -377,7 +377,10 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_ +-----------------------------------+-----------------------------------------------------+ | in vec3 **ALBEDO** | Base albedo. | +-----------------------------------+-----------------------------------------------------+ -| 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``. | +-----------------------------------+-----------------------------------------------------+ | out float **ALPHA** | Alpha (0..1); if written to, the material will go | | | to the transparent pipeline. |