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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-03 16:08:54 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-03 16:08:54 +0400
commit57cf48e7c6fd04f864072c21433a822907774f78 (patch)
tree45f3fa51f532a03e25c4d8ffa0c1be58027d01b2 /intern/cycles/kernel/kernel_object.h
parent8ca977b16e745f716d044a5b6ccbb5be4a70ac94 (diff)
Cycles Hair: refactoring to support generic attributes for hair curves. There
should be no functional changes yet. UV, tangent and intercept are now stored as attributes, with the intention to add more like multiple uv's, vertex colors, generated coordinates and motion vectors later. Things got a bit messy due to having both triangle and curve data in the same mesh data structure, which also gives us two sets of attributes. This will get cleaned up when we split the mesh class.
Diffstat (limited to 'intern/cycles/kernel/kernel_object.h')
-rw-r--r--intern/cycles/kernel/kernel_object.h50
1 files changed, 0 insertions, 50 deletions
diff --git a/intern/cycles/kernel/kernel_object.h b/intern/cycles/kernel/kernel_object.h
index 2260094aa70..40aa4753daa 100644
--- a/intern/cycles/kernel/kernel_object.h
+++ b/intern/cycles/kernel/kernel_object.h
@@ -288,55 +288,5 @@ __device float3 particle_angular_velocity(KernelGlobals *kg, int particle)
return make_float3(f3.z, f3.w, f4.x);
}
-#ifdef __HAIR__
-/* Hair Info Node fns */
-
-__device float hair_radius(KernelGlobals *kg, int prim, float u)
-{
- float r = 0.0f;
-
- if (prim != -1) {
- float4 v00 = kernel_tex_fetch(__cur_segs, prim);
-
- int v1 = __float_as_int(v00.x);
- int v2 = __float_as_int(v00.y);
-
- float4 P1 = kernel_tex_fetch(__cur_keys, v1);
- float4 P2 = kernel_tex_fetch(__cur_keys, v2);
- r = (P2.w - P1.w) * u + P1.w;
- }
-
- return r;
-}
-
-__device float3 hair_tangent_normal(KernelGlobals *kg, ShaderData *sd)
-{
- float3 tgN = make_float3(0.0f,0.0f,0.0f);
-
- if (sd->curve_seg != ~0) {
- tgN = -(-sd->I - sd->dPdu * (dot(sd->dPdu,-sd->I) * kernel_data.curve_kernel_data.normalmix / len_squared(sd->dPdu)));
- tgN = normalize(tgN);
- /*if (kernel_data.curve_kernel_data.use_tangent_normal_correction) need to find suitable scaled gd for corrected normal
- {
- tgN = normalize(tgN - gd * sd->dPdu);
- }*/
- }
-
- return tgN;
-}
-
-__device float intercept(KernelGlobals *kg, int prim, int triAddr, float u)
-{
- float t = 0.0f;
-
- if (prim != -1) {
- float4 sd2 = kernel_tex_fetch(__tri_woop, triAddr*3+2);
- t = (sd2.y - sd2.x) * u + sd2.x;
- }
-
- return t;
-}
-#endif
-
CCL_NAMESPACE_END