From 6a6775ebecaf1063dae0ea95e69de80d665272fd Mon Sep 17 00:00:00 2001 From: Pixelflinger Date: Wed, 8 Jul 2020 15:58:01 -0700 Subject: [PATCH] fix typo in IBL computation comment --- libs/ibl/src/CubemapIBL.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libs/ibl/src/CubemapIBL.cpp b/libs/ibl/src/CubemapIBL.cpp index 6923e455bd..e1df928f3c 100644 --- a/libs/ibl/src/CubemapIBL.cpp +++ b/libs/ibl/src/CubemapIBL.cpp @@ -512,27 +512,28 @@ void CubemapIBL::roughnessFilter( * ----------------------- * * We are trying to evaluate the following integral: - * (we pre-multiply by PI to avoid a 1/PI in the shader) * - * / - * Ed() = PI | L(s) ds - * / - * Ω + * / + * Ed() = | L(s) ds + * / + * Ω * * For this, we're using importance sampling: * - * PI L(l) - * Ed() = ---- ∑ ------- - * N l pdf + * 1 L(l) + * Ed() = --- ∑ ------- + * N l pdf * * * It results that: * - * PI n•l + * 1 PI * Ed() = ---- ∑ L(l) ------ - * N l PI + * N l n•l * * + * To avoid to multiply by 1/PI in the shader, we do it here, which simplifies to: + * * +----------------------+ * | 1 | * | Ed() = ---- ∑ L(l) |