Skip to content

Commit d251fe8

Browse files
authored
Divide pi out of light color
This should have been updated in #7568
1 parent 7207b49 commit d251fe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/shaders/shader_reference/spatial_shader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ Below is an example of a custom ``light()`` function using a Lambertian lighting
434434
.. code-block:: glsl
435435
436436
void light() {
437-
DIFFUSE_LIGHT += clamp(dot(NORMAL, LIGHT), 0.0, 1.0) * ATTENUATION * LIGHT_COLOR;
437+
DIFFUSE_LIGHT += clamp(dot(NORMAL, LIGHT), 0.0, 1.0) * ATTENUATION * LIGHT_COLOR / PI;
438438
}
439439
440440
If you want the lights to add together, add the light contribution to ``DIFFUSE_LIGHT`` using ``+=``, rather than overwriting it.

0 commit comments

Comments
 (0)