Skip to content

Commit f57bdb3

Browse files
committed
Document LIGHT_COLOR being multiplied by PI in Spatial shader
1 parent 4b089d5 commit f57bdb3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tutorials/shaders/shader_reference/spatial_shader.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,10 @@ If you want the lights to add together, add the light contribution to ``DIFFUSE_
441441
+-----------------------------------+----------------------------------------------------+
442442
| in vec3 **LIGHT** | Light Vector, in view space. |
443443
+-----------------------------------+----------------------------------------------------+
444-
| in vec3 **LIGHT_COLOR** | Color of light multiplied by energy. |
444+
| in vec3 **LIGHT_COLOR** | Color of light multiplied by ``energy * PI``. |
445+
| | The ``PI`` multiplication is present because |
446+
| | physically-based lighting models include a |
447+
| | division by ``PI``. |
445448
+-----------------------------------+----------------------------------------------------+
446449
| in float **SPECULAR_AMOUNT** | 2.0 * ``light_specular`` property for |
447450
| | ``OmniLight3D`` and ``SpotLight3D``. |

0 commit comments

Comments
 (0)