24 n = (n + 1013) & 0x7fffffff;
26 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
27 return 0.5f * ((
float)nn / 1073741824.0f);
47 if (offset_frequency && squash_frequency) {
48 brick_width *= (rownum % squash_frequency) ? 1.0f : squash_amount;
49 offset = (rownum % offset_frequency) ? 0.0f : (brick_width * offset_amount);
54 x = (p.
x + offset) - brick_width * bricknum;
55 y = p.
y - row_height * rownum;
58 float min_dist =
min(
min(
x,
y),
min(brick_width -
x, row_height -
y));
61 if (min_dist >= mortar_size) {
64 else if (mortar_smooth == 0.0f) {
68 min_dist = 1.0f - min_dist / mortar_size;
69 mortar = (min_dist < mortar_smooth) ?
smoothstepf(min_dist / mortar_smooth) : 1.0f;
83 uint co_offset, color1_offset, color2_offset, mortar_offset, scale_offset;
84 uint mortar_size_offset, bias_offset, brick_width_offset, row_height_offset;
85 uint color_offset, fac_offset, mortar_smooth_offset;
88 uint offset_frequency, squash_frequency;
92 node.z, &scale_offset, &mortar_size_offset, &bias_offset, &brick_width_offset);
94 node.w, &row_height_offset, &color_offset, &fac_offset, &mortar_smooth_offset);
128 float facm = 1.0f - tint;
129 color1 = facm * color1 + tint * color2;
typedef float(TangentPoint)[2]
_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 y
CCL_NAMESPACE_BEGIN ccl_device_inline float3 stack_load_float3(float *stack, uint a)
ccl_device_inline uint4 read_node(KernelGlobals *kg, int *offset)
ccl_device_inline float stack_load_float_default(float *stack, uint a, uint value)
ccl_device_inline void stack_store_float3(float *stack, uint a, float3 f)
ccl_device_forceinline void svm_unpack_node_uchar4(uint i, uint *x, uint *y, uint *z, uint *w)
ccl_device_inline void stack_store_float(float *stack, uint a, float f)
ccl_device_forceinline void svm_unpack_node_uchar2(uint i, uint *x, uint *y)
ccl_device_inline bool stack_valid(uint a)
#define ccl_device_noinline_cpu
#define ccl_device_inline
#define CCL_NAMESPACE_END
#define make_float2(x, y)
ccl_device void svm_node_tex_brick(KernelGlobals *kg, ShaderData *sd, float *stack, uint4 node, int *offset)
CCL_NAMESPACE_BEGIN ccl_device_inline float brick_noise(uint n)
ccl_device_noinline_cpu float2 svm_brick(float3 p, float mortar_size, float mortar_smooth, float bias, float brick_width, float row_height, float offset_amount, int offset_frequency, float squash_amount, int squash_frequency)
ccl_device_inline float saturate(float a)
ccl_device_inline int floor_to_int(float f)
ccl_device_inline float smoothstepf(float f)
ccl_device_inline float __int_as_float(int i)