Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37736188
en ru br
Репозитории ALT
S:3.6.3-alt1
5.1: 2.49b-alt1
4.1: 2.45-alt2.2.1.qa1
4.0: 2.45-alt0.M40.2
3.0: 2.36-alt1.1
www.altlinux.org/Changes

Другие репозитории
Upstream:2.45

Группа :: Графика
Пакет: blender

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0001-Cycles-Fix-MNEE-not-accounting-for-closure-Fresnel.patch
Скачать


From 8639bf013cdc93ee13fb6eec3f49203625a13e01 Mon Sep 17 00:00:00 2001
From: Lukas Stockner <lukas.stockner@freenet.de>
Date: Sat, 22 Jul 2023 04:01:41 +0200
Subject: [PATCH] Cycles: Fix MNEE not accounting for closure Fresnel
Previously Glass Fresnel used to get baked into the closure weight,
so the MNEE code could just ignore it.
However, now that it's part of the closure implementation, we need
to account for it in the MNEE throughput calculation as well.
---
 intern/cycles/kernel/integrator/mnee.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/intern/cycles/kernel/integrator/mnee.h b/intern/cycles/kernel/integrator/mnee.h
index 7af104f6096..2c1434dbc10 100644
--- a/intern/cycles/kernel/integrator/mnee.h
+++ b/intern/cycles/kernel/integrator/mnee.h
@@ -623,6 +623,8 @@ ccl_device_forceinline Spectrum mnee_eval_bsdf_contribution(ccl_private ShaderCl
     G = bsdf_G<MicrofacetType::GGX>(alpha2, cosNI, cosNO);
   }
 
+  Spectrum F = microfacet_fresnel(bsdf, wi, Ht, true);
+
   /*
    * bsdf_do = (1 - F) * D_do * G * |h.wi| / (n.wi * n.wo)
    *  pdf_dh = D_dh * cosThetaM
@@ -631,7 +633,7 @@ ccl_device_forceinline Spectrum mnee_eval_bsdf_contribution(ccl_private ShaderCl
    * contribution = bsdf_do * |do/dh| * |n.wo / n.h| / pdf_dh
    *              = (1 - F) * G * |h.wi / (n.wi * n.h^2)|
    */
-  return bsdf->weight * G * fabsf(cosHI / (cosNI * sqr(cosThetaM)));
+  return bsdf->weight * F * G * fabsf(cosHI / (cosNI * sqr(cosThetaM)));
 }
 
 /* Compute transfer matrix determinant |T1| = |dx1/dxn| (and |dh/dx| in the process) */
-- 
2.33.8
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin