From 412be23697b5d3bbb4a6ac879b66dc5971bf7966 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Wed, 9 Jul 2025 20:05:18 -0700 Subject: Address TODO --- src/llr/llr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/llr/llr.c b/src/llr/llr.c index 74cfaed..e5242e7 100644 --- a/src/llr/llr.c +++ b/src/llr/llr.c @@ -36,11 +36,14 @@ static bool init_ibl(LLR* renderer) { return true; } -// TODO: Why is this done lazily here? Do it when the environment light is -// created. -// /// Compute irradiance and prefiltered environment maps for the light if they /// have not been already computed. +/// +/// This is done lazily here, and not when the light is created, because we +/// need an IBL instance to do this and it is more convenient for the public +/// API to create lights without worrying about those details. It also makes the +/// public API cheaper, since the maps are only computed when they are actually +/// needed. static bool set_up_environment_light(LLR* renderer, EnvironmentLight* light) { assert(renderer); assert(light); -- cgit v1.2.3