[Bf-blender-cvs] [031a4d5e22f] blender2.8: Eevee: Volumetrics: Do not add anisotropy attribute, average it.

Clément Foucault noreply at git.blender.org
Wed Jul 5 19:17:51 CEST 2017


Commit: 031a4d5e22fbb31da74ff9eb51f0346656b530f1
Author: Clément Foucault
Date:   Wed Jul 5 18:31:43 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB031a4d5e22fbb31da74ff9eb51f0346656b530f1

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.

===================================================================

M	source/blender/draw/engines/eevee/shaders/bsdf_common_lib.glsl

===================================================================

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;
 }




More information about the Bf-blender-cvs mailing list