[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59072] trunk/blender/intern/cycles/kernel : Code cleanup / Cycles:

Thomas Dinges blender at dingto.org
Sun Aug 11 18:55:25 CEST 2013


Revision: 59072
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59072
Author:   dingto
Date:     2013-08-11 16:55:24 +0000 (Sun, 11 Aug 2013)
Log Message:
-----------
Code cleanup / Cycles:
* Remove unused "PathThroughput" variable.
* Don't compile unused voronoi code, we only use Distance Squared atm. 
* Various typo and comment fixes. 

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/kernel_types.h
    trunk/blender/intern/cycles/kernel/shaders/node_texture.h
    trunk/blender/intern/cycles/kernel/svm/svm_texture.h

Modified: trunk/blender/intern/cycles/kernel/kernel_types.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_types.h	2013-08-11 15:49:27 UTC (rev 59071)
+++ trunk/blender/intern/cycles/kernel/kernel_types.h	2013-08-11 16:55:24 UTC (rev 59072)
@@ -222,7 +222,7 @@
 	PATH_RAY_CURVE = 1024,
 
 	/* this gives collisions with localview bits
-	 * see: CYCLES_LOCAL_LAYER_HACK(), grr - Campbell */
+	 * see: blender_util.h, grr - Campbell */
 	PATH_RAY_LAYER_SHIFT = (32-20)
 };
 
@@ -279,8 +279,6 @@
 
 #ifdef __PASSES__
 
-typedef float3 PathThroughput;
-
 typedef struct PathRadiance {
 	int use_light_pass;
 
@@ -328,7 +326,6 @@
 
 #else
 
-typedef float3 PathThroughput;
 typedef float3 PathRadiance;
 typedef float3 BsdfEval;
 
@@ -600,7 +597,7 @@
 #endif
 } ShaderData;
 
-/* Constrant Kernel Data
+/* Constant Kernel Data
  *
  * These structs are passed from CPU to various devices, and the struct layout
  * must match exactly. Structs are padded to ensure 16 byte alignment, and we
@@ -774,8 +771,10 @@
 	int transmission_samples;
 	int ao_samples;
 	int mesh_light_samples;
-	int use_lamp_mis;
 	int subsurface_samples;
+	
+	/* mis */
+	int use_lamp_mis;
 
 	/* sampler */
 	int sampling_pattern;
@@ -821,7 +820,6 @@
 	float maximum_width;
 	float curve_epsilon;
 	int pad1;
-
 } KernelCurves;
 
 typedef struct KernelBSSRDF {

Modified: trunk/blender/intern/cycles/kernel/shaders/node_texture.h
===================================================================
--- trunk/blender/intern/cycles/kernel/shaders/node_texture.h	2013-08-11 15:49:27 UTC (rev 59071)
+++ trunk/blender/intern/cycles/kernel/shaders/node_texture.h	2013-08-11 16:55:24 UTC (rev 59072)
@@ -18,8 +18,11 @@
 
 float voronoi_distance(string distance_metric, vector d, float e)
 {
+#if 0
 	if (distance_metric == "Distance Squared")
+#endif
 		return dot(d, d);
+#if 0
 	if (distance_metric == "Actual Distance")
 		return length(d);
 	if (distance_metric == "Manhattan")
@@ -34,6 +37,7 @@
 		return pow(pow(fabs(d[0]), e) + pow(fabs(d[1]), e) + pow(fabs(d[2]), e), 1.0 / e);
 	
 	return 0.0;
+#endif
 }
 
 /* Voronoi / Worley like */

Modified: trunk/blender/intern/cycles/kernel/svm/svm_texture.h
===================================================================
--- trunk/blender/intern/cycles/kernel/svm/svm_texture.h	2013-08-11 15:49:27 UTC (rev 59071)
+++ trunk/blender/intern/cycles/kernel/svm/svm_texture.h	2013-08-11 16:55:24 UTC (rev 59072)
@@ -22,8 +22,11 @@
 
 __device float voronoi_distance(NodeDistanceMetric distance_metric, float3 d, float e)
 {
+#if 0
 	if(distance_metric == NODE_VORONOI_DISTANCE_SQUARED)
+#endif
 		return dot(d, d);
+#if 0
 	if(distance_metric == NODE_VORONOI_ACTUAL_DISTANCE)
 		return len(d);
 	if(distance_metric == NODE_VORONOI_MANHATTAN)
@@ -38,6 +41,7 @@
 		return powf(powf(fabsf(d.x), e) + powf(fabsf(d.y), e) + powf(fabsf(d.z), e), 1.0f/e);
 	
 	return 0.0f;
+#endif
 }
 
 /* Voronoi / Worley like */




More information about the Bf-blender-cvs mailing list