diff options
author | Thomas Dinges <blender@dingto.org> | 2013-08-11 20:55:24 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-08-11 20:55:24 +0400 |
commit | 9dfd2823c492d78bca532226f978a85728f6f3cc (patch) | |
tree | 661b65e11149ed44f5a17aff49af9d5d4417fc10 /intern | |
parent | 33686720f2313944d895e543c0fa306eaa9fe9c4 (diff) |
Code cleanup / Cycles:
* Remove unused "PathThroughput" variable.
* Don't compile unused voronoi code, we only use Distance Squared atm.
* Various typo and comment fixes.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/node_texture.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_texture.h | 4 |
3 files changed, 13 insertions, 7 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 538d11d9ae3..836eacf7cb6 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -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 { diff --git a/intern/cycles/kernel/shaders/node_texture.h b/intern/cycles/kernel/shaders/node_texture.h index e7801c0aba2..3997803ec08 100644 --- a/intern/cycles/kernel/shaders/node_texture.h +++ b/intern/cycles/kernel/shaders/node_texture.h @@ -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 */ diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h index f735eb8acbe..02fb3e5b86e 100644 --- a/intern/cycles/kernel/svm/svm_texture.h +++ b/intern/cycles/kernel/svm/svm_texture.h @@ -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 */ |