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:
@@ -222,7 +222,7 @@ enum PathRayFlag {
|
|||||||
PATH_RAY_CURVE = 1024,
|
PATH_RAY_CURVE = 1024,
|
||||||
|
|
||||||
/* this gives collisions with localview bits
|
/* 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)
|
PATH_RAY_LAYER_SHIFT = (32-20)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -279,8 +279,6 @@ typedef enum PassType {
|
|||||||
|
|
||||||
#ifdef __PASSES__
|
#ifdef __PASSES__
|
||||||
|
|
||||||
typedef float3 PathThroughput;
|
|
||||||
|
|
||||||
typedef struct PathRadiance {
|
typedef struct PathRadiance {
|
||||||
int use_light_pass;
|
int use_light_pass;
|
||||||
|
|
||||||
@@ -328,7 +326,6 @@ typedef struct BsdfEval {
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef float3 PathThroughput;
|
|
||||||
typedef float3 PathRadiance;
|
typedef float3 PathRadiance;
|
||||||
typedef float3 BsdfEval;
|
typedef float3 BsdfEval;
|
||||||
|
|
||||||
@@ -600,7 +597,7 @@ typedef struct ShaderData {
|
|||||||
#endif
|
#endif
|
||||||
} ShaderData;
|
} ShaderData;
|
||||||
|
|
||||||
/* Constrant Kernel Data
|
/* Constant Kernel Data
|
||||||
*
|
*
|
||||||
* These structs are passed from CPU to various devices, and the struct layout
|
* 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
|
* must match exactly. Structs are padded to ensure 16 byte alignment, and we
|
||||||
@@ -774,8 +771,10 @@ typedef struct KernelIntegrator {
|
|||||||
int transmission_samples;
|
int transmission_samples;
|
||||||
int ao_samples;
|
int ao_samples;
|
||||||
int mesh_light_samples;
|
int mesh_light_samples;
|
||||||
int use_lamp_mis;
|
|
||||||
int subsurface_samples;
|
int subsurface_samples;
|
||||||
|
|
||||||
|
/* mis */
|
||||||
|
int use_lamp_mis;
|
||||||
|
|
||||||
/* sampler */
|
/* sampler */
|
||||||
int sampling_pattern;
|
int sampling_pattern;
|
||||||
@@ -821,7 +820,6 @@ typedef struct KernelCurves {
|
|||||||
float maximum_width;
|
float maximum_width;
|
||||||
float curve_epsilon;
|
float curve_epsilon;
|
||||||
int pad1;
|
int pad1;
|
||||||
|
|
||||||
} KernelCurves;
|
} KernelCurves;
|
||||||
|
|
||||||
typedef struct KernelBSSRDF {
|
typedef struct KernelBSSRDF {
|
||||||
|
@@ -18,8 +18,11 @@
|
|||||||
|
|
||||||
float voronoi_distance(string distance_metric, vector d, float e)
|
float voronoi_distance(string distance_metric, vector d, float e)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (distance_metric == "Distance Squared")
|
if (distance_metric == "Distance Squared")
|
||||||
|
#endif
|
||||||
return dot(d, d);
|
return dot(d, d);
|
||||||
|
#if 0
|
||||||
if (distance_metric == "Actual Distance")
|
if (distance_metric == "Actual Distance")
|
||||||
return length(d);
|
return length(d);
|
||||||
if (distance_metric == "Manhattan")
|
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 pow(pow(fabs(d[0]), e) + pow(fabs(d[1]), e) + pow(fabs(d[2]), e), 1.0 / e);
|
||||||
|
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Voronoi / Worley like */
|
/* Voronoi / Worley like */
|
||||||
|
@@ -22,8 +22,11 @@ CCL_NAMESPACE_BEGIN
|
|||||||
|
|
||||||
__device float voronoi_distance(NodeDistanceMetric distance_metric, float3 d, float e)
|
__device float voronoi_distance(NodeDistanceMetric distance_metric, float3 d, float e)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if(distance_metric == NODE_VORONOI_DISTANCE_SQUARED)
|
if(distance_metric == NODE_VORONOI_DISTANCE_SQUARED)
|
||||||
|
#endif
|
||||||
return dot(d, d);
|
return dot(d, d);
|
||||||
|
#if 0
|
||||||
if(distance_metric == NODE_VORONOI_ACTUAL_DISTANCE)
|
if(distance_metric == NODE_VORONOI_ACTUAL_DISTANCE)
|
||||||
return len(d);
|
return len(d);
|
||||||
if(distance_metric == NODE_VORONOI_MANHATTAN)
|
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 powf(powf(fabsf(d.x), e) + powf(fabsf(d.y), e) + powf(fabsf(d.z), e), 1.0f/e);
|
||||||
|
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Voronoi / Worley like */
|
/* Voronoi / Worley like */
|
||||||
|
Reference in New Issue
Block a user