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) |