[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15736] branches/soc-2008-unclezeiv/source /blender/render/intern/source/lightcuts.c: Lowered the luminosity limit while creating lights from textures.
Davide Vercelli
davide.vercelli at gmail.com
Thu Jul 24 18:59:09 CEST 2008
Revision: 15736
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15736
Author: unclezeiv
Date: 2008-07-24 18:58:39 +0200 (Thu, 24 Jul 2008)
Log Message:
-----------
Lowered the luminosity limit while creating lights from textures.
The limit is there to avoid creating loads of black lights when an image is very dark; I'll remove it as soon as I code a faster tree creation step.
Modified Paths:
--------------
branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c
Modified: branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c
===================================================================
--- branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-07-24 14:11:36 UTC (rev 15735)
+++ branches/soc-2008-unclezeiv/source/blender/render/intern/source/lightcuts.c 2008-07-24 16:58:39 UTC (rev 15736)
@@ -175,6 +175,7 @@
#define LC_LUMINOSITY2(c1,c2) (LC_LUMINOSITY(c1)+LC_LUMINOSITY(c2))
/* #define LC_LUMINOSITY(c) (0.316*c[0] + 0.460*c[1] + 0.224*c[2]) */
#define IS_LEAF(node) (!(node)->child1 && !(node)->child2)
+#define LC_LUMINOSITY_LIMIT (0.0001f)
/* XXX: this function looks really slow! */
static float get_bounding_cone(LightcutsCluster * one, LightcutsCluster * two, float *vec)
@@ -688,7 +689,7 @@
shadeSkyView(col, NULL, co, dxyview);
/* XXX: arbitrary limit */
- if (LC_LUMINOSITY(col) < 0.01f)
+ if (LC_LUMINOSITY(col) < LC_LUMINOSITY_LIMIT)
continue;
gonew= MEM_callocN(sizeof(GroupObject), "groupobject");
@@ -904,7 +905,7 @@
}
/* XXX: arbitrary limit */
- if (LC_LUMINOSITY(col) < 0.01f)
+ if (LC_LUMINOSITY(col) < LC_LUMINOSITY_LIMIT)
continue;
gonew= MEM_callocN(sizeof(GroupObject), "groupobject");
More information about the Bf-blender-cvs
mailing list