Code cleanup / Cycles:

* Remove unused "PathThroughput" variable.
* Don't compile unused voronoi code, we only use Distance Squared atm. 
* Various typo and comment fixes.
This commit is contained in:
Thomas Dinges
2013-08-11 16:55:24 +00:00
parent 33686720f2
commit 9dfd2823c4
3 changed files with 13 additions and 7 deletions

View File

@@ -222,7 +222,7 @@ enum PathRayFlag {
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 @@ typedef enum PassType {
#ifdef __PASSES__
typedef float3 PathThroughput;
typedef struct PathRadiance {
int use_light_pass;
@@ -328,7 +326,6 @@ typedef struct BsdfEval {
#else
typedef float3 PathThroughput;
typedef float3 PathRadiance;
typedef float3 BsdfEval;
@@ -600,7 +597,7 @@ typedef struct ShaderData {
#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 @@ typedef struct KernelIntegrator {
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 @@ typedef struct KernelCurves {
float maximum_width;
float curve_epsilon;
int pad1;
} KernelCurves;
typedef struct KernelBSSRDF {

View File

@@ -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 @@ float voronoi_distance(string distance_metric, vector d, float e)
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 */

View File

@@ -22,8 +22,11 @@ CCL_NAMESPACE_BEGIN
__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 @@ __device float voronoi_distance(NodeDistanceMetric distance_metric, float3 d, fl
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 */