108 # define GP_DRAWTHICKNESS_SPECIAL 3
112 #define F2UB(x) (uchar)(255.0f * x)
123 if ((fix_strength) && (
alpha >= 0.1f)) {
149 for (
int i = 0; i < totpoints && pt; i++, pt++) {
173 const float viewport[2] = {(
float)tgpw->
winx, (
float)tgpw->
winy};
174 const float min_thickness = 0.05f;
179 int cyclic_add = (cyclic) ? 1 : 0;
194 float obj_scale = tgpw->
ob ?
212 for (
int i = 0; i < totpoints; i++, pt++) {
217 if ((cyclic) && (totpoints > 2)) {
219 max_ff((points + totpoints - 1)->pressure * thickness, min_thickness));
235 if (cyclic && totpoints > 2) {
305 const bool is_unique = (tgpw->
gps !=
NULL);
306 const bool use_mat = (tgpw->
gpd->
mat !=
NULL);
338 sthickness = gps->thickness + tgpw->
lthick;
341 sthickness = (short)
max_ii(1, sthickness / 2);
344 if (sthickness <= 0) {
392 if (gps->totpoints > 1) {
typedef float(TangentPoint)[2]
#define GPENCIL_ALPHA_OPACITY_THRESH
#define GPENCIL_STRENGTH_MIN
General operations, lookup, etc. for materials.
struct Material * BKE_material_default_gpencil(void)
MINLINE float max_ff(float a, float b)
MINLINE int max_ii(int a, int b)
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
#define ARRAY_SET_ITEMS(...)
@ GP_DATA_STROKE_KEEPTHICKNESS
@ GP_MATERIAL_HIDE_ONIONSKIN
Object is a sort of wrapper for general info.
void GPU_polygon_offset(float viewdist, float dist)
@ GPU_PRIM_LINE_STRIP_ADJ
@ GPU_SHADER_GPENCIL_STROKE
@ GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR
void GPU_program_point_size(bool enable)
void GPU_depth_mask(bool depth)
bool GPU_depth_mask_get(void)
void GPU_depth_test(eGPUDepthTest test)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static CCL_NAMESPACE_BEGIN const double alpha
static void gpencil_draw_stroke_3d(tGPDdraw *tgpw, short thickness, const float ink[4], bool cyclic)
static bool gpencil_can_draw_stroke(const bGPDstroke *gps, const int dflag)
static void gpencil_draw_stroke_volumetric_3d(const bGPDspoint *points, int totpoints, short thickness, const float ink[4])
static void gpencil_set_point_varying_color(const bGPDspoint *pt, const float ink[4], uint attr_id, bool fix_strength)
static void gpencil_draw_strokes(tGPDdraw *tgpw)
void ED_gpencil_draw_fill(tGPDdraw *tgpw)
struct @612::@615 attr_id
struct MaterialGPencilStyle * gp_style
struct RegionView3D * rv3d