27# define UI_COLOR_RGB_FROM_U8(r, g, b, v4) \
28 ARRAY_SET_ITEMS(v4, float(r) / 255.0f, float(g) / 255.0f, float(b) / 255.0f, 1.0)
30#define UI_COLOR_RGBA_FROM_U8(r, g, b, a, v4) \
31 ARRAY_SET_ITEMS(v4, float(r) / 255.0f, float(g) / 255.0f, float(b) / 255.0f, float(a) / 255.0f)
51 if (ctx->
rv3d !=
nullptr) {
57 for (
auto i :
IndexRange(plane_len, 6 - plane_len)) {
216 float *color = gb->UBO_FIRST_COLOR;
237 ramp.
data[0].
a = 1.0f;
238 ramp.
data[0].
b = 1.0f;
240 ramp.
data[1].
a = 1.0f;
241 ramp.
data[1].
g = 1.0f;
243 ramp.
data[2].
a = 1.0f;
244 ramp.
data[2].
r = 1.0f;
281 float viewmat[4][4], winmat[4][4];
285 float viewdist = rv3d->
dist;
353 if (r_color !=
nullptr) {
397 static float colors[11][4];
453 if (dim[0] == 0.0f) {
457 if (dim[1] == 0.0f) {
461 if (dim[2] == 0.0f) {
470 float ob_rot[3][3], invviewmat[4][4];
490 const float gamma = 1.5f;
491 const float hsv[3] = {(2.0f / 3.0f) * (1.0f - weight), 1.0f,
pow(0.5f + 0.5f * weight, gamma)};
495 for (
int i = 0; i < 3; i++) {
496 result[i] =
pow(result[i], 1.0f / gamma);
503 float pixels[256][4];
504 for (
int i = 0; i < 256; i++) {
void BKE_colorband_evaluate_table_rgba(const ColorBand *coba, float **array, int *size)
bool BKE_colorband_evaluate(const ColorBand *coba, float in, float out[4])
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_active_base_get(ViewLayer *view_layer)
General operations, lookup, etc. for blender objects.
void BKE_object_rot_to_mat3(const Object *ob, float r_mat[3][3], bool use_drot)
void BKE_object_dimensions_get(Object *ob, float r_vec[3])
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])
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 BASE_SELECTED(v3d, base)
@ USER_GPU_FLAG_FRESNEL_EDIT
#define RV3D_LOCK_FLAGS(rv3d)
#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 width, int mip_len, eGPUTextureFormat format, eGPUTextureUsage usage, const float *data)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ 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
pow(value.r - subtrahend, 2.0)") .do_static_compilation(true)
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
DRWView * DRW_view_create_with_zoffset(const DRWView *parent_view, const RegionView3D *rv3d, float offset)
#define UI_COLOR_RGBA_FROM_U8(r, g, b, a, v4)
static void DRW_evaluate_weight_to_color(const float weight, float result[4])
void DRW_globals_update()
static ColorBand weight_ramp_copy
bool DRW_object_is_flat(Object *ob, int *r_axis)
static bool weight_ramp_custom
static GPUTexture * DRW_create_weight_colorramp_texture()
bool DRW_object_axis_orthogonal_to_view(Object *ob, int axis)
float * DRW_color_background_blend_get(int theme_id)
Object * DRW_object_get_dupli_parent(const Object *)
const float * DRW_viewport_pixelsize_get()
const float * DRW_viewport_size_get()
const DRWContextState * DRW_context_state_get()
DRWView * DRW_view_create_sub(const DRWView *parent_view, const float viewmat[4][4], const float winmat[4][4])
void DRW_view_winmat_get(const DRWView *view, float mat[4][4], bool inverse)
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
draw_view in_light_buf[] float
RAYTRACE_GROUP_SIZE additional_info("eevee_shared", "eevee_gbuffer_data", "eevee_global_ubo", "eevee_sampling_data", "eevee_utility_texture", "eevee_hiz_data", "draw_view") .specialization_constant(Type RAYTRACE_GROUP_SIZE in_sh_0_tx in_sh_2_tx screen_normal_tx GPU_RGBA8
void MEM_freeN(void *vmemh)
VecBase< float, 4 > float4
GPUUniformBuf * block_ubo
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_face_retopology
float4 color_mball_stiffness
float4 color_handle_autoclamp
float4 color_active_spline
float4 color_edit_mesh_active
float4 color_vertex_select
float4 color_face_mode_select
float4 color_edge_bweight
float4 color_bone_active_unsel
float4 color_bone_ik_line_no_target
float4 color_handle_sel_align
float4 color_edge_mode_select
float4 color_nurb_sel_vline
float4 color_gpencil_vertex
float4 color_library_select
float4 color_bone_pose_no_target
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_before_frame
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