projects
/
42
/
miniRT.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2872aa
)
Add intensity dependence on distance
author
Lukáš Jiřiště
<jiriste@icpf.cas.cz>
Wed, 27 Nov 2024 09:23:58 +0000
(10:23 +0100)
committer
Lukáš Jiřiště
<jiriste@icpf.cas.cz>
Wed, 27 Nov 2024 09:23:58 +0000
(10:23 +0100)
src/scene.c
patch
|
blob
|
history
diff --git
a/src/scene.c
b/src/scene.c
index 005b996040da7391125c2f8e8d2590048b5be2b3..54b8e7ded25cdc17c536b7f07a4c0695b279fa27 100644
(file)
--- a/
src/scene.c
+++ b/
src/scene.c
@@
-300,7
+300,7
@@
t_color get_light_contribution(t_vec3 point, const t_object *object, const t_lig
|| get_intersection_arg(&new_ray, obstruction) < 0))
return (vec_real_mul(
vec_elwise_mul(light->color, object->object.plane.color),
- light->brightness * angle_multiplier));
+ light->brightness * angle_multiplier
/ distance / distance
));
else
return ((t_color){.x = 0, .y = 0, .z = 0});
}