23 # define UI_COLOR_RGB_FROM_U8(r, g, b, v4) \
24 ARRAY_SET_ITEMS(v4, (float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, 1.0)
26 #define UI_COLOR_RGBA_FROM_U8(r, g, b, a, v4) \
27 ARRAY_SET_ITEMS(v4, (float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, (float)a / 255.0f)
89 (
float[3]){0.3333f, 0.3333f, 0.3333f}));
182 for (
int i = 0; i < 2; i++) {
195 float *
color = gb->UBO_FIRST_COLOR;
216 ramp.
data[0].
a = 1.0f;
217 ramp.
data[0].
b = 1.0f;
219 ramp.
data[1].
a = 1.0f;
220 ramp.
data[1].
g = 1.0f;
222 ramp.
data[2].
a = 1.0f;
223 ramp.
data[2].
r = 1.0f;
260 float viewmat[4][4], winmat[4][4];
264 float viewdist = rv3d->
dist;
330 if (r_color !=
NULL) {
373 static float colors[11][4];
429 if (dim[0] == 0.0f) {
433 if (dim[1] == 0.0f) {
437 if (dim[2] == 0.0f) {
446 float ob_rot[3][3], invviewmat[4][4];
466 const float gamma = 1.5f;
467 const float hsv[3] = {(2.0f / 3.0f) * (1.0f - weight), 1.0f,
pow(0.5f + 0.5f * weight, gamma)};
471 for (
int i = 0; i < 3; i++) {
479 float pixels[256][4];
480 for (
int i = 0; i < 256; i++) {
typedef float(TangentPoint)[2]
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4])
void BKE_colorband_evaluate_table_rgba(const struct ColorBand *coba, float **array, int *size)
General operations, lookup, etc. for blender objects.
void BKE_object_dimensions_get(struct Object *ob, float r_vec[3])
void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot)
MINLINE float max_ff(float a, float b)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], float t)
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void zero_v4(float r[4])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void invert_v2(float r[2])
#define DRW_TEXTURE_FREE_SAFE(tex)
float GPU_polygon_offset_calc(const float(*winmat)[4], float viewdist, float dist)
GPUTexture * GPU_texture_create_1d(const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data)
struct GPUTexture GPUTexture
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
@ TH_TRANSPARENT_CHECKER_PRIMARY
@ TH_TRANSPARENT_CHECKER_SECONDARY
@ TH_HANDLE_SEL_AUTOCLAMP
@ TH_TRANSPARENT_CHECKER_SIZE
void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int offset, float col[4])
void UI_GetThemeColorBlendShade3fv(int colorid1, int colorid2, float fac, int offset, float col[3])
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4])
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4])
float UI_GetThemeValuef(int colorid)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
void DRW_globals_update(void)
float * DRW_color_background_blend_get(int theme_id)
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
#define UI_COLOR_RGBA_FROM_U8(r, g, b, a, v4)
static void DRW_evaluate_weight_to_color(const float weight, float result[4])
static ColorBand weight_ramp_copy
bool DRW_object_is_flat(Object *ob, int *r_axis)
DRWView * DRW_view_create_with_zoffset(const DRWView *parent_view, const RegionView3D *rv3d, float offset)
static bool weight_ramp_custom
void DRW_globals_free(void)
bool DRW_object_axis_orthogonal_to_view(Object *ob, int axis)
static struct GPUTexture * DRW_create_weight_colorramp_texture(void)
const float * DRW_viewport_pixelsize_get(void)
struct Object * DRW_object_get_dupli_parent(const Object *UNUSED(ob))
const DRWContextState * DRW_context_state_get(void)
const float * DRW_viewport_size_get(void)
const float * DRW_viewport_screenvecs_get(void)
void DRW_view_winmat_get(const DRWView *view, float mat[4][4], bool inverse)
DRWView * DRW_view_create_sub(const DRWView *parent_view, const float viewmat[4][4], const float winmat[4][4])
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
ccl_device_inline float3 pow(float3 v, float e)
bool active
all scheduled work for the GPU.
struct GPUUniformBuf * block_ubo
struct GPUTexture * weight_ramp
float4 color_bone_pose_active_unsel
float4 color_edit_mesh_middle
float4 color_handle_sel_autoclamp
float4 color_checker_primary
float4 color_mball_radius
float4 color_edge_face_select
float4 color_nurb_sel_uline
float4 color_mball_stiffness
float4 color_handle_autoclamp
float4 color_active_spline
float4 color_edit_mesh_active
float4 color_vertex_select
float4 color_edge_bweight
float4 color_bone_active_unsel
float4 color_bone_ik_line_no_target
float4 color_handle_sel_align
float4 color_nurb_sel_vline
float4 color_gpencil_vertex
float4 color_library_select
float4 color_handle_sel_auto
float4 color_bone_pose_constraint
float size_light_circle_shadow
float4 color_vertex_missing_data
float4 color_grid_emphasis
float4 color_bone_pose_target
float4 color_mball_stiffness_select
float4 color_handle_align
float4 color_gpencil_vertex_select
float4 color_edge_freestyle
float4 color_clipping_border
float4 color_bone_pose_active
float4 color_current_frame
float4 color_mball_radius_select
float4 color_bone_pose_ik
float4 color_bone_ik_line
float4 color_handle_sel_vect
float4 color_bone_ik_line_spline
float size_vertex_gpencil
float4 color_vertex_unreferenced
float4 color_bone_pose_spline_ik
float4 color_background_gradient
float4 color_face_freestyle
float4 color_light_no_alpha
float4 color_checker_secondary
float4 color_handle_sel_free