From 031a4d5e22fbb31da74ff9eb51f0346656b530f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 5 Jul 2017 18:31:43 +0200 Subject: [PATCH] Eevee: Volumetrics: Do not add anisotropy attribute, average it. This makes no sense to add theses. In cycles, each volume node is computed separatly. In eevee only the combined parameters are evaluated and phase should be averaged in this case. --- source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl index 059c579f60a..b15c3b6d452 100644 --- a/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl @@ -46,7 +46,7 @@ Closure closure_add(Closure cl1, Closure cl2) cl.absorption = cl1.absorption + cl2.absorption; cl.scatter = cl1.scatter + cl2.scatter; cl.emission = cl1.emission + cl2.emission; - cl.anisotropy = cl1.anisotropy + cl2.anisotropy; + cl.anisotropy = (cl1.anisotropy + cl2.anisotropy) / 2.0; /* Average phase (no multi lobe) */ return cl; }