40 while (
x++ != x_end) {
50 while (
x++ != x_end) {
54 uint col_u[4] = {0, 0, 0, 0};
55 for (
uint corner = 0; corner < 3; corner++) {
56 for (
uint chan = 0; chan < 4; chan++) {
57 col_u[chan] +=
data->smooth.color_u[corner][chan] *
uint(
w[corner] * 255.0f);
64 col.as_bytes[0] =
uchar(col_u[0] / 255);
65 col.as_bytes[1] =
uchar(col_u[1] / 255);
66 col.as_bytes[2] =
uchar(col_u[2] / 255);
67 col.as_bytes[3] =
uchar(col_u[3] / 255);
70 pt_step_fl[0] += 1.0f;
79 const uint *col =
static_cast<const uint *
>(
static_cast<void *
>(geom->
colors));
102 for (
int t = 0; t < coords_len; t += 1, pos += 3, col += 3) {
114 if ((col[0] == col[1]) && (col[0] == col[2])) {
135 for (
int i = 0; i <
length; i++) {
136 float rgb[3], hsl[3];
140 hsl_to_rgb(hsl[0], hsl[1], 1.0f - hsl[2], &rgb[0], &rgb[1], &rgb[2]);
#define ARRAY_SET_ITEMS(...)
#define UNPACK2_EX(pre, a, post)
#define UNPACK4_EX(pre, a, post)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
float length(VecOp< float, D >) RET
float3x3 scale(float3x3 mat, float2 scale)
ImBuf * BKE_icon_geom_rasterize(const Icon_Geom *geom, unsigned int size_x, unsigned int size_y)
void BLI_bitmap_draw_2d_tri_v2i(const int p1[2], const int p2[2], const int p3[2], void(*callback)(int x, int x_end, int y, void *), void *user_data)
void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
static void tri_fill_smooth(int x, int x_end, int y, void *user_data)
MINLINE int max_ii(int a, int b)
void BKE_icon_geom_invert_lightness(Icon_Geom *geom)
MINLINE void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
void barycentric_weights_v2_clamped(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
BMesh const char void * data
void hsl_to_rgb(float h, float s, float l, float *r_r, float *r_g, float *r_b)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, ImBufFlags flags)
static void tri_fill_flat(int x, int x_end, int y, void *user_data)
MINLINE void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
bool IMB_scale(ImBuf *ibuf, int2 new_size, IMBScaleFilter filter, bool threaded=true)
ccl_device_inline int rect_size(const int4 rect)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
unsigned char(* colors)[4]
unsigned char(* coords)[2]
uint8_t * byte_data_for_write()