Blender  V3.3
Functions
pattern.h File Reference
#include "kernel/sample/jitter.h"
#include "util/hash.h"

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device_forceinline float path_rng_1D (KernelGlobals kg, uint rng_hash, int sample, int dimension)
 
ccl_device_forceinline void path_rng_2D (KernelGlobals kg, uint rng_hash, int sample, int dimension, ccl_private float *fx, ccl_private float *fy)
 
ccl_device_inline uint hash_iqint1 (uint n)
 
ccl_device_inline uint hash_iqnt2d (const uint x, const uint y)
 
ccl_device_inline uint path_rng_hash_init (KernelGlobals kg, const int sample, const int x, const int y)
 
ccl_device_inline bool sample_is_even (int pattern, int sample)
 

Function Documentation

◆ hash_iqint1()

ccl_device_inline uint hash_iqint1 ( uint  n)

1D hash recommended from "Hash Functions for GPU Rendering" JCGT Vol. 9, No. 3, 2020 See https://www.shadertoy.com/view/4tXyWN and https://www.shadertoy.com/view/XlGcRh http://www.jcgt.org/published/0009/03/02/paper.pdf

Definition at line 110 of file pattern.h.

◆ hash_iqnt2d()

ccl_device_inline uint hash_iqnt2d ( const uint  x,
const uint  y 
)

2D hash recommended from "Hash Functions for GPU Rendering" JCGT Vol. 9, No. 3, 2020 See https://www.shadertoy.com/view/4tXyWN and https://www.shadertoy.com/view/XlGcRh http://www.jcgt.org/published/0009/03/02/paper.pdf

Definition at line 123 of file pattern.h.

References x, and y.

Referenced by path_rng_hash_init().

◆ path_rng_1D()

CCL_NAMESPACE_BEGIN ccl_device_forceinline float path_rng_1D ( KernelGlobals  kg,
uint  rng_hash,
int  sample,
int  dimension 
)

◆ path_rng_2D()

ccl_device_forceinline void path_rng_2D ( KernelGlobals  kg,
uint  rng_hash,
int  sample,
int  dimension,
ccl_private float fx,
ccl_private float fy 
)

◆ path_rng_hash_init()

ccl_device_inline uint path_rng_hash_init ( KernelGlobals  kg,
const int  sample,
const int  x,
const int  y 
)

Definition at line 132 of file pattern.h.

References hash_iqnt2d(), kernel_data, sample, void, x, and y.

Referenced by integrator_init_from_camera().

◆ sample_is_even()

ccl_device_inline bool sample_is_even ( int  pattern,
int  sample 
)

Definition at line 148 of file pattern.h.

References popcount(), sample, and SAMPLING_PATTERN_PMJ.

Referenced by kernel_accum_adaptive_buffer().