Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Broadfoot <gbroadfoot@hotmail.com>2013-08-18 17:41:53 +0400
committerStuart Broadfoot <gbroadfoot@hotmail.com>2013-08-18 17:41:53 +0400
commit2fd11a6617b84dbe5cae1a2c3f9145830b2bbfd4 (patch)
tree3446f01329b3a009d9cbd2e25ae7d171e6aa5e84 /intern/cycles/kernel
parent19d3e230e6d0cc52ebd82a8b5d0efbbeb396a9cf (diff)
Updates for the Cycle Hair UI. With the following changes
- Removed the cycles subdivision and interpolation of hairkeys. - Removed the parent settings. - Removed all of the advanced settings and presets. - This simplifies the UI to a few settings for the primitive type and a shape mode.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/kernel_bvh.h12
-rw-r--r--intern/cycles/kernel/kernel_curve.h6
-rw-r--r--intern/cycles/kernel/kernel_types.h18
3 files changed, 11 insertions, 25 deletions
diff --git a/intern/cycles/kernel/kernel_bvh.h b/intern/cycles/kernel/kernel_bvh.h
index c9e14645d47..f0f1fcd4c0a 100644
--- a/intern/cycles/kernel/kernel_bvh.h
+++ b/intern/cycles/kernel/kernel_bvh.h
@@ -1080,12 +1080,8 @@ __device_inline float3 bvh_curve_refine(KernelGlobals *kg, ShaderData *sd, const
#endif
if (flag & CURVE_KN_TRUETANGENTGNORMAL) {
- sd->Ng = -(D - tg * (dot(tg,D) * kernel_data.curve.normalmix));
+ sd->Ng = -(D - tg * dot(tg,D));
sd->Ng = normalize(sd->Ng);
- if (flag & CURVE_KN_NORMALCORRECTION) {
- sd->Ng = sd->Ng - gd * tg;
- sd->Ng = normalize(sd->Ng);
- }
}
else {
sd->Ng = (dif - tg * sd->u * l) / (P1.w + sd->u * l * gd);
@@ -1098,12 +1094,8 @@ __device_inline float3 bvh_curve_refine(KernelGlobals *kg, ShaderData *sd, const
sd->N = sd->Ng;
if (flag & CURVE_KN_TANGENTGNORMAL && !(flag & CURVE_KN_TRUETANGENTGNORMAL)) {
- sd->N = -(D - tg * (dot(tg,D) * kernel_data.curve.normalmix));
+ sd->N = -(D - tg * dot(tg,D));
sd->N = normalize(sd->N);
- if (flag & CURVE_KN_NORMALCORRECTION) {
- sd->N = sd->N - gd * tg;
- sd->N = normalize(sd->N);
- }
}
if (!(flag & CURVE_KN_TANGENTGNORMAL) && flag & CURVE_KN_TRUETANGENTGNORMAL) {
sd->N = (dif - tg * sd->u * l) / (P1.w + sd->u * l * gd);
diff --git a/intern/cycles/kernel/kernel_curve.h b/intern/cycles/kernel/kernel_curve.h
index b9637e7df8b..fa946a4c189 100644
--- a/intern/cycles/kernel/kernel_curve.h
+++ b/intern/cycles/kernel/kernel_curve.h
@@ -120,15 +120,13 @@ __device float3 curve_tangent_normal(KernelGlobals *kg, ShaderData *sd)
float3 tgN = make_float3(0.0f,0.0f,0.0f);
if(sd->segment != ~0) {
- float normalmix = kernel_data.curve.normalmix;
- tgN = -(-sd->I - sd->dPdu * (dot(sd->dPdu,-sd->I) * normalmix / len_squared(sd->dPdu)));
+ tgN = -(-sd->I - sd->dPdu * (dot(sd->dPdu,-sd->I) / len_squared(sd->dPdu)));
tgN = normalize(tgN);
/* need to find suitable scaled gd for corrected normal */
#if 0
- if (kernel_data.curve.use_tangent_normal_correction)
- tgN = normalize(tgN - gd * sd->dPdu);
+ tgN = normalize(tgN - gd * sd->dPdu);
#endif
}
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 836eacf7cb6..3008698313e 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -439,7 +439,6 @@ typedef enum AttributeStandard {
ATTR_STD_MOTION_PRE,
ATTR_STD_MOTION_POST,
ATTR_STD_PARTICLE,
- ATTR_STD_CURVE_TANGENT,
ATTR_STD_CURVE_INTERCEPT,
ATTR_STD_NUM,
@@ -798,20 +797,17 @@ typedef enum CurveFlag {
/* runtime flags */
CURVE_KN_BACKFACING = 1, /* backside of cylinder? */
CURVE_KN_ENCLOSEFILTER = 2, /* don't consider strands surrounding start point? */
- CURVE_KN_CURVEDATA = 4, /* curve data available? */
- CURVE_KN_INTERPOLATE = 8, /* render as a curve? */
- CURVE_KN_ACCURATE = 16, /* use accurate intersections test? */
- CURVE_KN_INTERSECTCORRECTION = 32, /* correct for width after determing closest midpoint? */
- CURVE_KN_POSTINTERSECTCORRECTION = 64, /* correct for width after intersect? */
- CURVE_KN_NORMALCORRECTION = 128, /* correct tangent normal for slope? */
- CURVE_KN_TRUETANGENTGNORMAL = 256, /* use tangent normal for geometry? */
- CURVE_KN_TANGENTGNORMAL = 512, /* use tangent normal for shader? */
- CURVE_KN_RIBBONS = 1024, /* use flat curve ribbons */
+ CURVE_KN_INTERPOLATE = 4, /* render as a curve? */
+ CURVE_KN_ACCURATE = 8, /* use accurate intersections test? */
+ CURVE_KN_INTERSECTCORRECTION = 16, /* correct for width after determing closest midpoint? */
+ CURVE_KN_POSTINTERSECTCORRECTION = 32, /* correct for width after intersect? */
+ CURVE_KN_TRUETANGENTGNORMAL = 64, /* use tangent normal for geometry? */
+ CURVE_KN_TANGENTGNORMAL = 128, /* use tangent normal for shader? */
+ CURVE_KN_RIBBONS = 256, /* use flat curve ribbons */
} CurveFlag;
typedef struct KernelCurves {
/* strand intersect and normal parameters - many can be changed to flags*/
- float normalmix;
float encasing_ratio;
int curveflags;
int subdivisions;