|
Blender V4.5
|
Go to the source code of this file.
Classes | |
| struct | OVERLAY_GridData |
| struct | ThemeColors |
| struct | ThemeSizes |
| struct | UniformData |
| struct | ExtraInstanceData |
| struct | VertexData |
| struct | ParticlePointData |
| struct | BoneEnvelopeData |
| struct | BoneStickData |
Macros | |
| #define | VERT_GPENCIL_BEZT_HANDLE (1u << 30) |
| #define | FACE_ACTIVE (1u << 0) |
| #define | FACE_SELECTED (1u << 1) |
| #define | FACE_FREESTYLE (1u << 2) |
| #define | VERT_UV_SELECT (1u << 3) |
| #define | VERT_UV_PINNED (1u << 4) |
| #define | EDGE_UV_SELECT (1u << 5) |
| #define | FACE_UV_ACTIVE (1u << 6) |
| #define | FACE_UV_SELECT (1u << 7) |
| #define | VERT_ACTIVE (1u << 0) |
| #define | VERT_SELECTED (1u << 1) |
| #define | VERT_SELECTED_BEZT_HANDLE (1u << 2) |
| #define | EDGE_ACTIVE (1u << 3) |
| #define | EDGE_SELECTED (1u << 4) |
| #define | EDGE_SEAM (1u << 5) |
| #define | EDGE_SHARP (1u << 6) |
| #define | EDGE_FREESTYLE (1u << 7) |
| #define | OVERLAY_GRID_STEPS_LEN 8 |
| #define | WIRE_WIDTH_COMPRESSION 16.0 |
| #define | PARTICLE_SHAPE_CIRCLE_RESOLUTION 7 |
| #define | M_1_SQRTPI 0.5641895835477563f |
| #define | DISC_RADIUS (M_1_SQRTPI * 1.05f) |
| #define | LINE_SMOOTH_START (0.5f - DISC_RADIUS) |
| #define | LINE_SMOOTH_END (0.5f + DISC_RADIUS) |
| #define | LINE_STEP(dist) |
Functions | |
| static uint | outline_id_pack (uint outline_id, uint object_id) |
| BLI_STATIC_ASSERT (CURVE_HANDLE_SELECTED==0u, "Ensure value is sync") | |
| BLI_STATIC_ASSERT (CURVE_HANDLE_ALL==1u, "Ensure value is sync") | |
| BLI_STATIC_ASSERT (MOTIONPATH_VERT_SEL==(1u<< 0), "Ensure value is sync") | |
| BLI_STATIC_ASSERT (MOTIONPATH_VERT_KEY==(1u<< 1), "Ensure value is sync") | |
| #define DISC_RADIUS (M_1_SQRTPI * 1.05f) |
Definition at line 467 of file overlay_shader_shared.hh.
| #define EDGE_ACTIVE (1u << 3) |
Definition at line 105 of file overlay_shader_shared.hh.
| #define EDGE_FREESTYLE (1u << 7) |
Definition at line 109 of file overlay_shader_shared.hh.
| #define EDGE_SEAM (1u << 5) |
Definition at line 107 of file overlay_shader_shared.hh.
| #define EDGE_SELECTED (1u << 4) |
Definition at line 106 of file overlay_shader_shared.hh.
| #define EDGE_SHARP (1u << 6) |
Definition at line 108 of file overlay_shader_shared.hh.
| #define EDGE_UV_SELECT (1u << 5) |
Definition at line 98 of file overlay_shader_shared.hh.
| #define FACE_ACTIVE (1u << 0) |
Definition at line 93 of file overlay_shader_shared.hh.
| #define FACE_FREESTYLE (1u << 2) |
Definition at line 95 of file overlay_shader_shared.hh.
| #define FACE_SELECTED (1u << 1) |
Definition at line 94 of file overlay_shader_shared.hh.
| #define FACE_UV_ACTIVE (1u << 6) |
Definition at line 99 of file overlay_shader_shared.hh.
| #define FACE_UV_SELECT (1u << 7) |
Definition at line 100 of file overlay_shader_shared.hh.
| #define LINE_SMOOTH_END (0.5f + DISC_RADIUS) |
Definition at line 469 of file overlay_shader_shared.hh.
| #define LINE_SMOOTH_START (0.5f - DISC_RADIUS) |
Definition at line 468 of file overlay_shader_shared.hh.
| #define LINE_STEP | ( | dist | ) |
Definition at line 471 of file overlay_shader_shared.hh.
| #define M_1_SQRTPI 0.5641895835477563f |
We want to know how much of a pixel is covered by a line. Here, we imagine the square pixel is a circle with the same area and try to find the intersection area. The overlap area is a circular segment. https://en.wikipedia.org/wiki/Circular_segment The formula for the area uses inverse trig function and is quite complex. Instead, we approximate it by using the smoothstep function and a 1.05f factor to the disc radius.
For an alternate approach, see: https://developer.nvidia.com/gpugems/gpugems2/part-iii-high-quality-rendering/chapter-22-fast-prefiltered-lines
Definition at line 466 of file overlay_shader_shared.hh.
| #define OVERLAY_GRID_STEPS_LEN 8 |
Definition at line 120 of file overlay_shader_shared.hh.
| #define PARTICLE_SHAPE_CIRCLE_RESOLUTION 7 |
Definition at line 370 of file overlay_shader_shared.hh.
Referenced by blender::draw::overlay::Particles::object_sync().
| #define VERT_ACTIVE (1u << 0) |
Definition at line 102 of file overlay_shader_shared.hh.
| #define VERT_GPENCIL_BEZT_HANDLE (1u << 30) |
Definition at line 91 of file overlay_shader_shared.hh.
| #define VERT_SELECTED (1u << 1) |
Definition at line 103 of file overlay_shader_shared.hh.
| #define VERT_SELECTED_BEZT_HANDLE (1u << 2) |
Definition at line 104 of file overlay_shader_shared.hh.
| #define VERT_UV_PINNED (1u << 4) |
Definition at line 97 of file overlay_shader_shared.hh.
| #define VERT_UV_SELECT (1u << 3) |
Definition at line 96 of file overlay_shader_shared.hh.
| #define WIRE_WIDTH_COMPRESSION 16.0 |
Definition at line 123 of file overlay_shader_shared.hh.
Referenced by drw_shgroup_bone_custom_empty(), drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), and drw_shgroup_custom_bone_curve().
| enum OVERLAY_BackgroundType : uint32_t |
| Enumerator | |
|---|---|
| BG_SOLID | |
| BG_GRADIENT | |
| BG_CHECKER | |
| BG_RADIAL | |
| BG_SOLID_CHECKER | |
| BG_MASK | |
Definition at line 14 of file overlay_shader_shared.hh.
| enum OVERLAY_GridBits : uint32_t |
| Enumerator | |
|---|---|
| SHOW_AXIS_X | |
| SHOW_AXIS_Y | |
| SHOW_AXIS_Z | |
| SHOW_GRID | |
| PLANE_XY | |
| PLANE_XZ | |
| PLANE_YZ | |
| CLIP_ZPOS | |
| CLIP_ZNEG | |
| GRID_BACK | |
| GRID_CAMERA | |
| PLANE_IMAGE | |
| CUSTOM_GRID | |
Definition at line 31 of file overlay_shader_shared.hh.
| enum OVERLAY_ParticleShape : uint32_t |
| Enumerator | |
|---|---|
| PART_SHAPE_AXIS | |
| PART_SHAPE_CIRCLE | |
| PART_SHAPE_CROSS | |
Definition at line 372 of file overlay_shader_shared.hh.
| enum OVERLAY_UVLineStyle : uint32_t |
| Enumerator | |
|---|---|
| OVERLAY_UV_LINE_STYLE_OUTLINE | |
| OVERLAY_UV_LINE_STYLE_DASH | |
| OVERLAY_UV_LINE_STYLE_BLACK | |
| OVERLAY_UV_LINE_STYLE_WHITE | |
| OVERLAY_UV_LINE_STYLE_SHADOW | |
Definition at line 23 of file overlay_shader_shared.hh.
| enum StickBoneFlag |
| Enumerator | |
|---|---|
| COL_WIRE | |
| COL_HEAD | |
| COL_TAIL | |
| COL_BONE | |
| POS_HEAD | |
| POS_TAIL | |
| POS_BONE | |
Definition at line 76 of file overlay_shader_shared.hh.
| enum VertexClass : uint32_t |
Definition at line 50 of file overlay_shader_shared.hh.
| BLI_STATIC_ASSERT | ( | CURVE_HANDLE_ALL | = =1u, |
| "Ensure value is sync" | ) |
References BLI_STATIC_ASSERT, and CURVE_HANDLE_ALL.
| BLI_STATIC_ASSERT | ( | CURVE_HANDLE_SELECTED | = =0u, |
| "Ensure value is sync" | ) |
References BLI_STATIC_ASSERT, and CURVE_HANDLE_SELECTED.
| BLI_STATIC_ASSERT | ( | MOTIONPATH_VERT_KEY | = =(1u<< 1), |
| "Ensure value is sync" | ) |
References BLI_STATIC_ASSERT, and MOTIONPATH_VERT_KEY.
| BLI_STATIC_ASSERT | ( | MOTIONPATH_VERT_SEL | = =(1u<< 0), |
| "Ensure value is sync" | ) |
References BLI_STATIC_ASSERT, and MOTIONPATH_VERT_SEL.
Definition at line 111 of file overlay_shader_shared.hh.
References outline_id_pack().
Referenced by outline_id_pack().