13 n = (n + 1013) & 0x7fffffff;
15 nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
16 return 0.5f * ((
float)nn / 1073741824.0f);
36 if (offset_frequency && squash_frequency) {
37 brick_width *= (rownum % squash_frequency) ? 1.0f : squash_amount;
38 offset = (rownum % offset_frequency) ? 0.0f : (brick_width * offset_amount);
43 x = (p.
x +
offset) - brick_width * bricknum;
44 y = p.
y - row_height * rownum;
47 float min_dist =
min(
min(
x,
y),
min(brick_width -
x, row_height -
y));
50 if (min_dist >= mortar_size) {
53 else if (mortar_smooth == 0.0f) {
57 min_dist = 1.0f - min_dist / mortar_size;
58 mortar = (min_dist < mortar_smooth) ?
smoothstepf(min_dist / mortar_smooth) : 1.0f;
72 uint co_offset, color1_offset, color2_offset, mortar_offset, scale_offset;
73 uint mortar_size_offset, bias_offset, brick_width_offset, row_height_offset;
74 uint color_offset, fac_offset, mortar_smooth_offset;
77 uint offset_frequency, squash_frequency;
81 node.z, &scale_offset, &mortar_size_offset, &bias_offset, &brick_width_offset);
83 node.w, &row_height_offset, &color_offset, &fac_offset, &mortar_smooth_offset);
117 float facm = 1.0f - tint;
118 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_device_noinline int svm_node_tex_brick(KernelGlobals kg, ccl_private ShaderData *sd, ccl_private 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)
#define ccl_device_noinline_cpu
#define ccl_device_inline
#define ccl_device_noinline
#define CCL_NAMESPACE_END
const KernelGlobalsCPU *ccl_restrict KernelGlobals
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_device_inline void stack_store_float3(ccl_private float *stack, uint a, float3 f)
CCL_NAMESPACE_BEGIN ccl_device_inline float3 stack_load_float3(ccl_private float *stack, uint a)
ccl_device_inline uint4 read_node(KernelGlobals kg, ccl_private int *offset)
ccl_device_forceinline void svm_unpack_node_uchar2(uint i, ccl_private uint *x, ccl_private uint *y)
ccl_device_inline float stack_load_float_default(ccl_private float *stack, uint a, uint value)
ccl_device_inline void stack_store_float(ccl_private float *stack, uint a, float f)
ccl_device_forceinline void svm_unpack_node_uchar4(uint i, ccl_private uint *x, ccl_private uint *y, ccl_private uint *z, ccl_private uint *w)
ccl_device_inline bool stack_valid(uint a)
ccl_device_inline float saturatef(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)