Cycles Hair: Corrected own stochastic hair rng mistake and removed an unnecessary...
authorStuart Broadfoot <gbroadfoot@hotmail.com>
Wed, 17 Apr 2013 11:27:56 +0000 (11:27 +0000)
committerStuart Broadfoot <gbroadfoot@hotmail.com>
Wed, 17 Apr 2013 11:27:56 +0000 (11:27 +0000)
- Corrected the Sobol dimension and removed a pad variable in Curve Struct.

intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_types.h
intern/cycles/render/mesh.h

index 8603b23f19b464c160894655c031737e77e7957c..5847b4831c4737d0f949954ae898e7137c7af8c3 100644 (file)
@@ -258,7 +258,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
                        difl = kernel_data.curve_kernel_data.minimum_width * len(pixdiff) * 0.5f;
                }
                float extmax = kernel_data.curve_kernel_data.maximum_width;
-               float rng_hair_seed = path_rng(kg, rng, sample, rng_offset + PRNG_STOCHASTIC_HAIR);
+               float rng_hair_seed = path_rng(kg, rng, sample, rng_offset + PRNG_HAIR);
                uint lcg_state = lcg_init(rng_hair_seed);
 
                bool hit = scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax);
@@ -930,7 +930,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
                        difl = kernel_data.curve_kernel_data.minimum_width * len(pixdiff) * 0.5f;
                }
                float extmax = kernel_data.curve_kernel_data.maximum_width;
-               float rng_hair_seed = path_rng(kg, rng, sample, rng_offset + PRNG_STOCHASTIC_HAIR);
+               float rng_hair_seed = path_rng(kg, rng, sample, rng_offset + PRNG_HAIR);
                uint lcg_state = lcg_init(rng_hair_seed);
 
                if(!scene_intersect(kg, &ray, visibility, &isect, &lcg_state, difl, extmax)) {
index 82ea6a603fe8a3b0bf0e99ad8061aa5c106659a0..44c0f090c227c5cff7497210ed83c41d324e47ae 100644 (file)
@@ -159,8 +159,8 @@ enum PathTraceDimension {
        PRNG_LIGHT_V = 5,
        PRNG_LIGHT_F = 6,
        PRNG_TERMINATE = 7,
-       PRNG_BOUNCE_NUM = 8,
-       PRNG_STOCHASTIC_HAIR = 9
+       PRNG_HAIR = 8,
+       PRNG_BOUNCE_NUM = 9
 };
 
 /* these flags values correspond to raytypes in osl.cpp, so keep them in sync!
index dca1b00e1fff462470b4be893fe919d0b4e6a1a5..63d6b50ffca89d5b9bebbc868a2ce2f71e8b4bbe 100644 (file)
@@ -55,7 +55,6 @@ public:
                int first_key;
                int num_keys;
                uint shader;
-               uint pad;
 
                int num_segments() { return num_keys - 1; }
        };