[Bf-blender-cvs] [2d407fc288b] master: Fix T52661: mesh light shader using backfacing not working, after new sampling.

Brecht Van Lommel noreply at git.blender.org
Wed Sep 6 13:54:21 CEST 2017


Commit: 2d407fc288bbdf840d81bcc20fcfca60b9d14d4e
Author: Brecht Van Lommel
Date:   Wed Sep 6 13:46:27 2017 +0200
Branches: master
https://developer.blender.org/rB2d407fc288bbdf840d81bcc20fcfca60b9d14d4e

Fix T52661: mesh light shader using backfacing not working, after new sampling.

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

M	intern/cycles/kernel/kernel_light.h

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

diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index e481468ea18..59db6cbd430 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -891,7 +891,7 @@ ccl_device_forceinline void triangle_light_sample(KernelGlobals *kg, int prim, i
 
 	/* flip normal if necessary */
 	const int object_flag = kernel_tex_fetch(__object_flag, object);
-	if(!(object_flag & SD_OBJECT_NEGATIVE_SCALE_APPLIED)) {
+	if(object_flag & SD_OBJECT_NEGATIVE_SCALE_APPLIED) {
 		ls->Ng = -ls->Ng;
 	}
 	ls->eval_fac = 1.0f;



More information about the Bf-blender-cvs mailing list