36 double ht_offset[3] = {0.0, 0.0, 0.0};
37 const uint ht_primes[3] = {2, 3, 7};
42 ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0);
43 ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0);
44 ht_point[2] = fmod(ht_point[2] * 1151.0, 1.0);
46 float omega = ht_point[1] * 2.0f *
M_PI;
48 rsample[2] = ht_point[0] * 2.0f - 1.0f;
50 float r =
sqrtf(
fmaxf(0.0f, 1.0f - rsample[2] * rsample[2]));
52 rsample[0] =
r *
cosf(omega);
53 rsample[1] =
r *
sinf(omega);
60 const float x_axis[3],
61 const float y_axis[3],
67 double ht_offset[2] = {0.0, 0.0};
68 const uint ht_primes[2] = {2, 3};
73 ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0);
74 ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0);
77 ht_point[0] = (ht_point[0] > 0.5f) ? ht_point[0] - 1.0f : ht_point[0];
78 ht_point[1] = (ht_point[1] > 0.5f) ? ht_point[1] - 1.0f : ht_point[1];
81 madd_v3_v3fl(rsample, x_axis, (ht_point[0] * 2.0f) * size_x);
82 madd_v3_v3fl(rsample, y_axis, (ht_point[1] * 2.0f) * size_y);
86 const float x_axis[3],
87 const float y_axis[3],
93 double ht_offset[2] = {0.0, 0.0};
94 const uint ht_primes[2] = {2, 3};
99 ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0);
100 ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0);
103 float omega = ht_point[1] * 2.0f *
M_PI;
104 float r =
sqrtf(ht_point[0]);
105 ht_point[0] =
r *
cosf(omega) * size_x;
106 ht_point[1] =
r *
sinf(omega) * size_y;
116 double ht_offset[3] = {0.0, 0.0, 0.0};
117 const uint ht_primes[3] = {2, 3, 5};
122 ht_point[0] = fmod(ht_point[0] * 1151.0, 1.0);
123 ht_point[1] = fmod(ht_point[1] * 1069.0, 1.0);
124 ht_point[2] = fmod(ht_point[2] * 1151.0, 1.0);
126 rotate_m4(r_mat,
'X', ht_point[0] * scale);
127 rotate_m4(r_mat,
'Y', ht_point[1] * scale);
128 rotate_m4(r_mat,
'Z', ht_point[2] * scale);
void rotate_m4(float mat[4][4], const char axis, const float angle)
MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f)
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void zero_v3(float r[3])
void BLI_halton_3d(const unsigned int prime[3], double offset[3], int n, double *r)
void BLI_halton_2d(const unsigned int prime[2], double offset[2], int n, double *r)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
void EEVEE_sample_ellipse(int sample_ofs, const float x_axis[3], const float y_axis[3], float size_x, float size_y, float rsample[3])
void EEVEE_random_rotation_m4(int sample_ofs, float scale, float r_mat[4][4])
void EEVEE_sample_ball(int sample_ofs, float radius, float rsample[3])
void EEVEE_sample_rectangle(int sample_ofs, const float x_axis[3], const float y_axis[3], float size_x, float size_y, float rsample[3])