[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25636] trunk/blender/source/gameengine/ Converter/BL_BlenderDataConversion.cpp: BGE bugfix: [#19476] Negative Lamps in BGE Do Not Function (in GLSL)

Dalai Felinto dfelinto at gmail.com
Thu Dec 31 08:17:15 CET 2009


Revision: 25636
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25636
Author:   dfelinto
Date:     2009-12-31 08:17:14 +0100 (Thu, 31 Dec 2009)

Log Message:
-----------
BGE bugfix: [#19476] Negative Lamps in BGE Do Not Function (in GLSL)
this bug was introduced in Blender 2.49 (probably my own fault, in other part of the code though while fixing support for IPOs in GLSL Lamps).

The good news is: GLSL Lamps looks in BGE like working perfectly now.

Multitexture on the other hand is not supporting "negative" lamps (with the checkbox option on).

>From my search (svn blame+log) it looks like multitexture never had negative lamp working. Actually in Blender 2.34 when this was introduced in BGE (maybe in Blender as well?) I couldn't see negative lamps working either. It's hard to test this with Blender 2.34 though (it even crash with my test file).

Modified Paths:
--------------
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp

Modified: trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-12-31 04:56:23 UTC (rev 25635)
+++ trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2009-12-31 07:17:14 UTC (rev 25636)
@@ -1633,12 +1633,16 @@
 	lightobj.m_nodiffuse = (la->mode & LA_NO_DIFF) != 0;
 	lightobj.m_nospecular = (la->mode & LA_NO_SPEC) != 0;
 	
+/*
+	NEGATIVE LAMP only supported in GLSL mode, and handled inside the lamp update function
+	code commented out now, to be removed or extended to multitexture mode
 	if (la->mode & LA_NEG)
 	{
 		lightobj.m_red = -lightobj.m_red;
 		lightobj.m_green = -lightobj.m_green;
 		lightobj.m_blue = -lightobj.m_blue;
 	}
+*/
 		
 	if (la->type==LA_SUN) {
 		lightobj.m_type = RAS_LightObject::LIGHT_SUN;





More information about the Bf-blender-cvs mailing list