~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to intern/cycles/kernel/svm/svm_wave.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
CCL_NAMESPACE_BEGIN
20
20
 
21
 
/* Marble */
 
21
/* Wave */
22
22
 
23
 
__device_noinline float svm_wave(NodeWoodType type, float3 p, float scale, float detail, float distortion, float dscale)
 
23
__device_noinline float svm_wave(NodeWaveType type, float3 p, float scale, float detail, float distortion, float dscale)
24
24
{
25
25
        float w, n;
26
26
 
27
27
        p *= scale;
28
28
 
29
29
        if(type == NODE_WAVE_BANDS)
30
 
                n= (p.x + p.x + p.z)*10.0f;
 
30
                n = (p.x + p.y + p.z) * 10.0f;
31
31
        else /* if(type == NODE_WAVE_RINGS) */
32
 
                n= len(p)*20.0f;
 
32
                n = len(p) * 20.0f;
33
33
        
34
34
        if(distortion != 0.0f)
35
35
                n += distortion * noise_turbulence(p*dscale, NODE_NOISE_PERLIN, detail, 0);
55
55
        float distortion = stack_load_float_default(stack, distortion_offset, node2.z);
56
56
        float dscale = stack_load_float_default(stack, dscale_offset, node2.w);
57
57
 
58
 
        float f = svm_wave((NodeWoodType)type, co, scale, detail, distortion, dscale);
 
58
        float f = svm_wave((NodeWaveType)type, co, scale, detail, distortion, dscale);
59
59
 
60
60
        if(stack_valid(fac_offset)) stack_store_float(stack, fac_offset, f);
61
61
        if(stack_valid(color_offset)) stack_store_float3(stack, color_offset, make_float3(f, f, f));