diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-16 17:14:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-16 17:14:02 +0400 |
commit | 66b1dfae89cc44953bd51c5da962cab437e76972 (patch) | |
tree | e7679b3e554fb4f1bb6f68775c8619bcde0da822 /intern/cycles/kernel/kernel_random.h | |
parent | 0a5fcf3da3e82fd114095c8c2903d927f15ffc31 (diff) |
Cycles: tweaks to properties and nodes
* Passes renamed to samples
* Camera lens radius renamed to aperature size/blades/rotation
* Glass and fresnel nodes input is now index of refraction
* Glossy and velvet fresnel socket removed
* Mix/add closure node renamed to mix/add shader node
* Blend weight node added for shader mixing weights
There is some version patching code for reading existing files, but it's not
perfect, so shaders may work a bit different.
Diffstat (limited to 'intern/cycles/kernel/kernel_random.h')
-rw-r--r-- | intern/cycles/kernel/kernel_random.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/intern/cycles/kernel/kernel_random.h b/intern/cycles/kernel/kernel_random.h index 6c2daafb061..13cf4df8b8c 100644 --- a/intern/cycles/kernel/kernel_random.h +++ b/intern/cycles/kernel/kernel_random.h @@ -95,7 +95,7 @@ __device uint sobol_lookup(const uint m, const uint frame, const uint ex, const return index; } -__device_inline float path_rng(KernelGlobals *kg, RNG *rng, int pass, int dimension) +__device_inline float path_rng(KernelGlobals *kg, RNG *rng, int sample, int dimension) { #ifdef __SOBOL_FULL_SCREEN__ uint result = sobol_dimension(kg, *rng, dimension); @@ -103,7 +103,7 @@ __device_inline float path_rng(KernelGlobals *kg, RNG *rng, int pass, int dimens return r; #else /* compute sobol sequence value using direction vectors */ - uint result = sobol_dimension(kg, pass, dimension); + uint result = sobol_dimension(kg, sample, dimension); float r = (float)result * (1.0f/(float)0xFFFFFFFF); /* Cranly-Patterson rotation using rng seed */ @@ -118,13 +118,13 @@ __device_inline float path_rng(KernelGlobals *kg, RNG *rng, int pass, int dimens #endif } -__device_inline void path_rng_init(KernelGlobals *kg, __global uint *rng_state, int pass, RNG *rng, int x, int y, float *fx, float *fy) +__device_inline void path_rng_init(KernelGlobals *kg, __global uint *rng_state, int sample, RNG *rng, int x, int y, float *fx, float *fy) { #ifdef __SOBOL_FULL_SCREEN__ uint px, py; uint bits = 16; /* limits us to 65536x65536 and 65536 samples */ uint size = 1 << bits; - uint frame = pass; + uint frame = sample; *rng = sobol_lookup(bits, frame, x, y, &px, &py); @@ -133,8 +133,8 @@ __device_inline void path_rng_init(KernelGlobals *kg, __global uint *rng_state, #else *rng = rng_state[x + y*kernel_data.cam.width]; - *fx = path_rng(kg, rng, pass, PRNG_FILTER_U); - *fy = path_rng(kg, rng, pass, PRNG_FILTER_V); + *fx = path_rng(kg, rng, sample, PRNG_FILTER_U); + *fy = path_rng(kg, rng, sample, PRNG_FILTER_V); #endif } @@ -147,25 +147,25 @@ __device void path_rng_end(KernelGlobals *kg, __global uint *rng_state, RNG rng, /* Linear Congruential Generator */ -__device float path_rng(KernelGlobals *kg, RNG *rng, int pass, int dimension) +__device float path_rng(KernelGlobals *kg, RNG *rng, int sample, int dimension) { /* implicit mod 2^32 */ *rng = (1103515245*(*rng) + 12345); return (float)*rng * (1.0f/(float)0xFFFFFFFF); } -__device void path_rng_init(KernelGlobals *kg, __global uint *rng_state, int pass, RNG *rng, int x, int y, float *fx, float *fy) +__device void path_rng_init(KernelGlobals *kg, __global uint *rng_state, int sample, RNG *rng, int x, int y, float *fx, float *fy) { /* load state */ *rng = rng_state[x + y*kernel_data.cam.width]; - *fx = path_rng(kg, rng, pass, PRNG_FILTER_U); - *fy = path_rng(kg, rng, pass, PRNG_FILTER_V); + *fx = path_rng(kg, rng, sample, PRNG_FILTER_U); + *fy = path_rng(kg, rng, sample, PRNG_FILTER_V); } __device void path_rng_end(KernelGlobals *kg, __global uint *rng_state, RNG rng, int x, int y) { - /* store state for next pass */ + /* store state for next sample */ rng_state[x + y*kernel_data.cam.width] = rng; } |