Blender  V2.93
Macros | Functions
kernel_jitter.h File Reference

Go to the source code of this file.

Macros

#define CMJ_RANDOM_OFFSET_LIMIT   4096
 

Functions

ccl_device_inline bool cmj_is_pow2 (int i)
 
ccl_device_inline int cmj_fast_mod_pow2 (int a, int b)
 
ccl_device_inline int cmj_fast_div_pow2 (int a, int b)
 
ccl_device_inline uint cmj_w_mask (uint w)
 
ccl_device_inline uint cmj_permute (uint i, uint l, uint p)
 
ccl_device_inline uint cmj_hash (uint i, uint p)
 
ccl_device_inline uint cmj_hash_simple (uint i, uint p)
 
ccl_device_inline float cmj_randfloat (uint i, uint p)
 
ccl_device float pmj_sample_1D (KernelGlobals *kg, int sample, int rng_hash, int dimension)
 
ccl_device float2 pmj_sample_2D (KernelGlobals *kg, int sample, int rng_hash, int dimension)
 

Macro Definition Documentation

◆ CMJ_RANDOM_OFFSET_LIMIT

#define CMJ_RANDOM_OFFSET_LIMIT   4096

Definition at line 25 of file kernel_jitter.h.

Function Documentation

◆ cmj_fast_div_pow2()

ccl_device_inline int cmj_fast_div_pow2 ( int  a,
int  b 
)

Definition at line 38 of file kernel_jitter.h.

References Freestyle::a, count_trailing_zeros(), and kernel_assert.

◆ cmj_fast_mod_pow2()

ccl_device_inline int cmj_fast_mod_pow2 ( int  a,
int  b 
)

Definition at line 32 of file kernel_jitter.h.

References Freestyle::a.

◆ cmj_hash()

ccl_device_inline uint cmj_hash ( uint  i,
uint  p 
)

Definition at line 106 of file kernel_jitter.h.

Referenced by cmj_randfloat(), and subsurface_random_walk().

◆ cmj_hash_simple()

ccl_device_inline uint cmj_hash_simple ( uint  i,
uint  p 
)

Definition at line 122 of file kernel_jitter.h.

Referenced by path_rng_1D(), path_state_rng_1D_hash(), pmj_sample_1D(), and pmj_sample_2D().

◆ cmj_is_pow2()

ccl_device_inline bool cmj_is_pow2 ( int  i)

Definition at line 27 of file kernel_jitter.h.

◆ cmj_permute()

ccl_device_inline uint cmj_permute ( uint  i,
uint  l,
uint  p 
)

Definition at line 50 of file kernel_jitter.h.

References cmj_w_mask(), l, and w().

◆ cmj_randfloat()

ccl_device_inline float cmj_randfloat ( uint  i,
uint  p 
)

Definition at line 131 of file kernel_jitter.h.

References cmj_hash().

Referenced by pmj_sample_1D(), and pmj_sample_2D().

◆ cmj_w_mask()

ccl_device_inline uint cmj_w_mask ( uint  w)

Definition at line 44 of file kernel_jitter.h.

References count_leading_zeros(), kernel_assert, and w().

Referenced by cmj_permute().

◆ pmj_sample_1D()

ccl_device float pmj_sample_1D ( KernelGlobals *  kg,
int  sample,
int  rng_hash,
int  dimension 
)

◆ pmj_sample_2D()

ccl_device float2 pmj_sample_2D ( KernelGlobals *  kg,
int  sample,
int  rng_hash,
int  dimension 
)