37 if (eln->obindex == obindex) {
49 if (elist[i].edge_identifier == edge_identifier) {
62 double view_vector[3];
63 double light_vector[3];
64 bool side_1_facing_light =
false;
65 bool side_2_facing_light =
false;
66 bool side_1_facing_camera =
false;
73 double dot_light_1 =
dot_v3v3_db(light_vector,
e->t1->gn);
74 side_1_facing_light = (dot_light_1 > 0);
76 double dot_light_2 =
dot_v3v3_db(light_vector,
e->t2->gn);
77 side_2_facing_light = (dot_light_2 > 0);
80 side_2_facing_light = !side_1_facing_light;
90 side_1_facing_camera = (dot_view_1 > 0);
92 if ((side_1_facing_camera && (!side_1_facing_light) && side_2_facing_light) ||
93 ((!side_1_facing_camera) && side_1_facing_light && (!side_2_facing_light))) {
105 double la1 = es->ratio;
106 double la2 = es->next ? es->next->ratio : 1.0f;
107 la1 = la1 *
e->v2->fbcoord[3] /
108 (
e->v1->fbcoord[3] - la1 * (
e->v1->fbcoord[3] -
e->v2->fbcoord[3]));
109 la2 = la2 *
e->v2->fbcoord[3] /
110 (
e->v1->fbcoord[3] - la2 * (
e->v1->fbcoord[3] -
e->v2->fbcoord[3]));
134 eln_isect_shadow = eln;
140 eln_isect_original = eln;
144 if (!eln_isect_shadow || !eln_isect_original) {
150 for (
int i = 0; i < eln_isect_original->
element_count; i++) {
190 double real_at = ((at_2 - at_1) == 0) ? 0 : ((ratio - at_1) / (at_2 - at_1));
191 double ga = fb_co_1[3] * real_at / (fb_co_2[3] * (1.0f - real_at) + fb_co_1[3] * real_at);
193 r_fb_co[3] =
interpd(fb_co_2[3], fb_co_1[3], ga);
233 double *r_new_in_the_middle,
234 double *r_new_in_the_middle_global,
240 int z_index = is_persp ? 3 : 2;
242 if (s1_fb_co_1[z_index] >= s2_fb_co_1[z_index]) {
247 if (s1_fb_co_2[z_index] >= s2_fb_co_2[z_index]) {
253 if (s1_fb_co_1[z_index] <= s2_fb_co_1[z_index]) {
258 if (s1_fb_co_2[z_index] <= s2_fb_co_2[z_index]) {
273 *use_new_ref =
false;
280 double dl = s1_fb_co_1[z_index] - s2_fb_co_1[z_index];
281 double dr = s1_fb_co_2[z_index] - s2_fb_co_2[z_index];
282 double ga =
ratiod(dl, dr, 0);
283 *r_new_at = is_persp ? s2_fb_co_2[3] * ga / (s2_fb_co_1[3] * (1.0f - ga) + s2_fb_co_2[3] * ga) :
286 r_new_in_the_middle[3] =
interpd(s2_fb_co_2[3], s2_fb_co_1[3], ga);
296 bool transform_edge_cuts,
297 bool do_light_contour)
300 #define DISCARD_NONSENSE_SEGMENTS \
301 if (es->occlusion != 0 || \
303 LRT_DOUBLE_CLOSE_ENOUGH(es->ratio, ((LineartEdgeSegment *)es->next)->ratio))) { \
304 LRT_ITER_ALL_LINES_NEXT; \
309 int segment_count = 0;
311 if (do_light_contour) {
319 if (!(
e->flags & accept_types)) {
330 double *view_vector = vv;
331 double dot_1 = 0, dot_2 = 0;
343 if ((
result = dot_1 * dot_2) <= 0 && (dot_1 + dot_2)) {
383 double ga1 =
e->v1->fbcoord[3] * es->ratio /
384 (es->ratio *
e->v1->fbcoord[3] + (1 - es->ratio) *
e->v2->fbcoord[3]);
385 double ga2 =
e->v1->fbcoord[3] * next_at /
386 (next_at *
e->v1->fbcoord[3] + (1 - next_at) *
e->v2->fbcoord[3]);
393 sedge[i].fbc1[3] = 1e30;
394 sedge[i].fbc2[3] = 1e30;
395 sedge[i].fbc1[2] = 1e30;
396 sedge[i].fbc2[2] = 1e30;
401 sseg[i * 2].
ratio = 0.0f;
402 sseg[i * 2 + 1].
ratio = 1.0f;
403 BLI_addtail(&sedge[i].shadow_segments, &sseg[i * 2]);
404 BLI_addtail(&sedge[i].shadow_segments, &sseg[i * 2 + 1]);
408 sedge[i].e_ref_light_contour =
e;
417 sedge[i].es_ref = es;
428 if (transform_edge_cuts) {
432 es->ratio =
e->v1->fbcoord[3] * es->ratio /
433 (es->ratio *
e->v1->fbcoord[3] + (1 - es->ratio) *
e->v2->fbcoord[3]);
439 if (
G.debug_value == 4000) {
440 printf(
"Shadow: Added %d raw shadow_edges\n", segment_count);
499 *cut_end_before =
e->shadow_segments.last;
527 for (seg =
e->shadow_segments.first; seg; seg = seg->
next) {
529 cut_start_after = seg;
530 new_seg_1 = cut_start_after;
537 if (i_seg->
ratio > start + 1
e-09 && start > seg->
ratio) {
538 cut_start_after = seg;
546 for (seg = cut_start_after->
next; seg; seg = seg->
next) {
550 cut_end_before = seg;
551 new_seg_2 = cut_end_before;
557 cut_end_before = seg;
558 new_seg_2 = cut_end_before;
563 if (seg->
ratio > end) {
564 cut_end_before = seg;
571 if (new_seg_1 ==
NULL) {
574 if (new_seg_2 ==
NULL) {
576 new_seg_2 = new_seg_1;
577 cut_end_before = new_seg_2;
586 new_seg_1->
ratio = start;
588 new_seg_2->ratio = end;
591 double r_fb_co_1[4], r_fb_co_2[4], r_gloc_1[3], r_gloc_2[3];
592 double r_new_in_the_middle[4], r_new_in_the_middle_global[3], r_new_at;
593 double *s1_fb_co_1, *s1_fb_co_2, *s1_gloc_1, *s1_gloc_2;
596 double t_g1[3], t_g2[3], t_fbc1[4], t_fbc2[4], m_g1[3], m_fbc1[4], m_g2[3], m_fbc2[4];
597 bool is_side_2r, has_middle =
false, use_new_ref;
603 for (seg = cut_start_after; seg != cut_end_before; seg = nes) {
606 s1_fb_co_1 = seg->
fbc2, s1_fb_co_2 = nes->
fbc1;
607 s1_gloc_1 = seg->
g2, s1_gloc_2 = nes->
g1;
608 seg_1 = seg, seg_2 = nes;
609 if (seg == cut_start_after) {
619 s1_fb_co_1 = m_fbc1, s1_gloc_1 = m_g1;
621 if (cut_start_after != new_seg_1) {
627 if (nes == cut_end_before) {
637 s1_fb_co_2 = m_fbc2, s1_gloc_2 = m_g2;
639 if (cut_end_before != new_seg_2) {
644 seg_2->flag = seg->
flag;
650 start_fb_co, end_fb_co, start_gloc, end_gloc, seg_2->ratio, start, end, t_fbc2, t_g2);
666 r_new_in_the_middle_global,
671 ss_middle->
ratio =
interpf(seg_2->ratio, seg_1->ratio, r_new_at);
674 ss_middle->
target_reference = (use_new_ref ? (target_reference) : seg_1->target_reference);
690 seg_1->target_reference = is_side_2r ? seg->
target_reference : target_reference;
695 seg_1->target_reference = use_new_ref ? target_reference : seg->
target_reference;
712 bool *r_facing_light)
715 double *LFBC = sedge->
fbc1, *RFBC = sedge->
fbc2, *FBC0 = tri->
v[0]->
fbcoord,
721 if ((
MAX3(FBC0[0], FBC1[0], FBC2[0]) <
MIN2(LFBC[0], RFBC[0])) ||
722 (
MIN3(FBC0[0], FBC1[0], FBC2[0]) >
MAX2(LFBC[0], RFBC[0])) ||
723 (
MAX3(FBC0[1], FBC1[1], FBC2[1]) <
MIN2(LFBC[1], RFBC[1])) ||
724 (
MIN3(FBC0[1], FBC1[1], FBC2[1]) >
MAX2(LFBC[1], RFBC[1]))) {
768 double gpos1[3], gpos2[3];
769 double *
v1 = (trie[0] == 0 ? FBC0 : (trie[0] == 1 ? FBC1 : FBC2));
770 double *
v2 = (trie[0] == 0 ? FBC1 : (trie[0] == 1 ? FBC2 : FBC0));
771 double *v3 = (trie[1] == 0 ? FBC0 : (trie[1] == 1 ? FBC1 : FBC2));
772 double *v4 = (trie[1] == 0 ? FBC1 : (trie[1] == 1 ? FBC2 : FBC0));
773 double *gv1 = (trie[0] == 0 ? tri->
v[0]->
gloc :
774 (trie[0] == 1 ? tri->
v[1]->
gloc : tri->
v[2]->
gloc));
775 double *gv2 = (trie[0] == 0 ? tri->
v[1]->
gloc :
776 (trie[0] == 1 ? tri->
v[2]->
gloc : tri->
v[0]->
gloc));
777 double *gv3 = (trie[1] == 0 ? tri->
v[0]->
gloc :
778 (trie[1] == 1 ? tri->
v[1]->
gloc : tri->
v[2]->
gloc));
779 double *gv4 = (trie[1] == 0 ? tri->
v[1]->
gloc :
780 (trie[1] == 1 ? tri->
v[2]->
gloc : tri->
v[0]->
gloc));
781 double gr1 = is_persp ?
v1[3] * ratio[0] / (ratio[0] *
v1[3] + (1 - ratio[0]) *
v2[3]) :
783 double gr2 = is_persp ? v3[3] * ratio[1] / (ratio[1] * v3[3] + (1 - ratio[1]) * v4[3]) :
788 double fbc1[4], fbc2[4];
797 int use = (
fabs(LFBC[0] - RFBC[0]) >
fabs(LFBC[1] - RFBC[1])) ? 0 : 1;
798 double at1 =
ratiod(LFBC[use], RFBC[use], fbc1[use]);
799 double at2 =
ratiod(LFBC[use], RFBC[use], fbc2[use]);
803 SWAP(
double, at1, at2);
807 if (at1 > (1.0f - FLT_EPSILON) || at2 < FLT_EPSILON) {
813 double t_fbc1[4], t_fbc2[4], t_gpos1[3], t_gpos2[3];
814 bool trimmed1 =
false, trimmed2 =
false;
815 if (at1 < 0 || at2 > 1) {
816 double rat1 = (-at1) / (at2 - at1);
817 double rat2 = (1.0f - at1) / (at2 - at1);
818 double gat1 = is_persp ? fbc1[3] * rat1 / (rat1 * fbc1[3] + (1 - rat1) * fbc2[3]) : rat1;
819 double gat2 = is_persp ? fbc1[3] * rat2 / (rat2 * fbc1[3] + (1 - rat2) * fbc2[3]) : rat2;
823 t_fbc1[3] =
interpd(fbc2[3], fbc1[3], gat1);
824 at1 = 0, trimmed1 =
true;
829 t_fbc2[3] =
interpd(fbc2[3], fbc1[3], gat2);
830 at2 = 1, trimmed2 =
true;
849 double camera_vector[3];
859 *r_facing_light = (dot_f < 0);
878 double fb_co_1[4], fb_co_2[4];
879 double global_1[3], global_2[3];
884 for (
int i = 0; i < nba->triangle_count; i++) {
925 bool do_original_edges,
930 int tot_orig_edges = 0;
945 int edge_alloc = tot_edges + (do_original_edges ? tot_orig_edges : 0);
947 if (
G.debug_value == 4000) {
948 printf(
"Line art shadow segments total: %d\n", tot_edges);
991 e->target_reference = sseg->target_reference;
998 if (do_original_edges) {
1010 e->target_reference = ((ref_1 << 32) | ref_2);
1045 double at_start =
interpd(es_end, es_start, sseg->ratio);
1046 double at_end =
interpd(es_end, es_start, sseg->next->ratio);
1064 if (
e->min_occ > 0) {
1067 for (es =
e->segments.first; es; es = es->
next) {
1075 double ga1 =
e->v1->fbcoord[3] * es->
ratio /
1076 (es->
ratio *
e->v1->fbcoord[3] + (1 - es->
ratio) *
e->v2->fbcoord[3]);
1077 double ga2 =
e->v1->fbcoord[3] * next_at /
1078 (next_at *
e->v1->fbcoord[3] + (1 - next_at) *
e->v2->fbcoord[3]);
1079 double g1[3], g2[3], g1v[4], g2v[4];
1095 #define GET_RATIO(n) \
1096 (fabs(orig_e->v2->fbcoord[0] - orig_e->v1->fbcoord[0]) > \
1097 fabs(orig_e->v2->fbcoord[1] - orig_e->v1->fbcoord[1])) ? \
1098 ((g##n##v[0] - orig_e->v1->fbcoord[0]) / \
1099 (orig_e->v2->fbcoord[0] - orig_e->v1->fbcoord[0])) : \
1100 ((g##n##v[1] - orig_e->v1->fbcoord[1]) / (orig_e->v2->fbcoord[1] - orig_e->v1->fbcoord[1]))
1126 ListBase *r_calculated_edges_eln_list,
1136 if (
G.debug_value == 4000) {
1140 bool is_persp =
true;
1179 if (!ld->
w || !ld->
h) {
1180 ld->
w = ld->
h = 200;
1260 (*r_shadow_ld_if_reproject) = ld;
1267 if (
G.debug_value == 4000) {
1269 printf(
"Line art shadow stage 1 time: %f\n", t_elapsed);
1272 return any_generated;
1282 const int element_index,
1340 &transform_settings);
1355 if (
G.debug_value == 4000) {
1366 if (
G.debug_value == 4000) {
1368 printf(
"Line art shadow stage 2 cast and silhouette time: %f\n", t_elapsed);
1387 if (!any_generated) {
1415 if (
G.debug_value == 4000) {
1417 printf(
"Line art shadow stage 2 total time: %f\n", t_elapsed);
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
MINLINE double interpd(double a, double b, double t)
MINLINE double ratiod(double min, double max, double pos)
MINLINE float interpf(float a, float b, float t)
void mul_v4_m4v3_db(double r[4], const double mat[4][4], const double vec[3])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void unit_m4_db(double m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_m4db_m4db_m4fl_uniq(double R[4][4], const double A[4][4], const float B[4][4])
void copy_m4_m4_db(double m1[4][4], const double m2[4][4])
void interp_v3_v3v3_db(double target[3], const double a[3], const double b[3], double t)
MINLINE void swap_v3_v3_db(double a[3], double b[3])
MINLINE void mul_v3db_db(double r[3], double f)
MINLINE double dot_v3v3_db(const double a[3], const double b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3db_v3fl(double r[3], const float a[3])
MINLINE void swap_v4_v4_db(double a[4], double b[4])
MINLINE void copy_v3_v3_db(double r[3], const double a[3])
MINLINE void copy_v4_v4_db(double r[4], const double a[4])
MINLINE void sub_v3_v3v3_db(double r[3], const double a[3], const double b[3])
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
void BLI_spin_init(SpinLock *spin)
void BLI_spin_unlock(SpinLock *spin)
void BLI_spin_lock(SpinLock *spin)
struct Depsgraph Depsgraph
Object groups, one object can be in many groups at once.
@ LRT_EDGE_FLAG_SHADOW_FACING_LIGHT
@ LRT_EDGE_FLAG_PROJECTED_SHADOW
@ LRT_EDGE_FLAG_CONTOUR_SECONDARY
@ LRT_EDGE_FLAG_LIGHT_CONTOUR
@ LRT_ALLOW_DUPLI_OBJECTS
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
#define LRT_DOUBLE_CLOSE_ENOUGH(a, b)
#define LRT_OBINDEX_LOWER
#define LRT_SHADOW_MASK_ENCLOSED_SHAPE
#define LRT_OBINDEX_HIGHER
@ LRT_TILE_RECURSIVE_PERSPECTIVE
@ LRT_TILE_RECURSIVE_ORTHO
#define LRT_SHADOW_SILHOUETTE_ERASED_GROUP
#define LRT_SHADOW_MASK_ILLUMINATED
#define LRT_CLOSE_LOOSER_v3(a, b)
#define LRT_SHADOW_MASK_SHADED
@ LRT_ELEMENT_INTERSECTION_DATA
BLI_INLINE int lineart_line_isec_2d_ignore_line2pos(const double a1[2], const double a2[2], const double b1[2], const double b2[2], double *r_a_ratio)
@ LRT_SHADOW_FACING_LIGHT
Platform independent time functions.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Depsgraph * depsgraph
void lineart_main_occlusion_begin(LineartData *ld)
void lineart_main_discard_out_of_frame_edges(LineartData *ld)
void lineart_main_get_view_vector(LineartData *ld)
void lineart_main_link_lines(LineartData *ld)
void lineart_main_load_geometries(Depsgraph *depsgraph, Scene *scene, Object *camera, LineartData *ld, bool allow_duplicates, bool do_shadow_casting, ListBase *shadow_elns)
bool lineart_edge_from_triangle(const LineartTriangle *tri, const LineartEdge *e, bool allow_overlapping_edges)
void lineart_main_bounding_areas_connect_post(LineartData *ld)
void lineart_main_add_triangles(LineartData *ld)
void lineart_add_edge_to_array(LineartPendingEdges *pe, LineartEdge *e)
void lineart_main_clear_linked_edges(LineartData *ld)
void lineart_main_cull_triangles(LineartData *ld, bool clip_far)
void lineart_main_bounding_area_make_initial(LineartData *ld)
void lineart_main_free_adjacent_data(LineartData *ld)
void lineart_destroy_render_data_keep_init(LineartData *ld)
void lineart_edge_cut(LineartData *ld, LineartEdge *e, double start, double end, uchar material_mask_bits, uchar mat_occlusion, uint32_t shadow_bits)
void lineart_main_perspective_division(LineartData *ld)
void lineart_finalize_object_edge_array_reserve(LineartPendingEdges *pe, int count)
#define LRT_EDGE_BA_MARCHING_BEGIN(fb1, fb2)
void * lineart_mem_acquire_thread(struct LineartStaticMemPool *smp, size_t size)
#define LRT_EDGE_BA_MARCHING_NEXT(fb1, fb2)
#define LRT_EDGE_BA_MARCHING_END
#define LRT_ITER_ALL_LINES_END
void lineart_matrix_perspective_44d(double(*mProjection)[4], double fFov_rad, double fAspect, double zMin, double zMax)
#define LRT_ITER_ALL_LINES_BEGIN
void * lineart_mem_acquire(struct LineartStaticMemPool *smp, size_t size)
void lineart_matrix_ortho_44d(double(*mProjection)[4], double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
LineartEdge * lineart_find_matching_edge(LineartElementLinkNode *shadow_eln, uint64_t edge_identifier)
static bool lineart_contour_viewed_from_dark_side(LineartData *ld, LineartEdge *e)
static void lineart_shadow_register_enclosed_shapes(LineartData *ld, LineartData *shadow_ld)
static bool lineart_shadow_cast_generate_edges(LineartData *ld, bool do_original_edges, LineartElementLinkNode **r_veln, LineartElementLinkNode **r_eeln)
static void lineart_shadow_segment_slice_get(double *fb_co_1, double *fb_co_2, double *gloc_1, double *gloc_2, double ratio, double at_1, double at_2, double *r_fb_co, double *r_gloc)
static void lineart_shadow_cast(LineartData *ld, bool transform_edge_cuts, bool do_light_contour)
static void lineart_shadow_register_silhouette(LineartData *ld)
static void lineart_shadow_create_shadow_edge_array(LineartData *ld, bool transform_edge_cuts, bool do_light_contour)
void lineart_register_intersection_shadow_cuts(LineartData *ld, ListBase *shadow_elns)
static bool lineart_shadow_cast_onto_triangle(LineartData *ld, LineartTriangle *tri, LineartShadowEdge *sedge, double *r_at_1, double *r_at_2, double *r_fb_co_1, double *r_fb_co_2, double *r_gloc_1, double *r_gloc_2, bool *r_facing_light)
bool lineart_main_try_generate_shadow(Depsgraph *depsgraph, Scene *scene, LineartData *original_ld, LineartGpencilModifierData *lmd, LineartStaticMemPool *shadow_data_pool, LineartElementLinkNode **r_veln, LineartElementLinkNode **r_eeln, ListBase *r_calculated_edges_eln_list, LineartData **r_shadow_ld_if_reproject)
static void lineart_shadow_edge_cut(LineartData *ld, LineartShadowEdge *e, double start, double end, double *start_gloc, double *end_gloc, double *start_fb_co, double *end_fb_co, bool facing_light, uint32_t target_reference)
void lineart_main_make_enclosed_shapes(LineartData *ld, LineartData *shadow_ld)
static void lineart_shadow_transform_task(void *__restrict userdata, const int element_index, const TaskParallelTLS *__restrict UNUSED(tls))
static bool lineart_do_closest_segment(bool is_persp, double *s1_fb_co_1, double *s1_fb_co_2, double *s2_fb_co_1, double *s2_fb_co_2, double *s1_gloc_1, double *s1_gloc_2, double *s2_gloc_1, double *s2_gloc_2, double *r_fb_co_1, double *r_fb_co_2, double *r_gloc_1, double *r_gloc_2, double *r_new_in_the_middle, double *r_new_in_the_middle_global, double *r_new_at, bool *is_side_2r, bool *use_new_ref)
static LineartShadowSegment * lineart_give_shadow_segment(LineartData *ld)
LineartElementLinkNode * lineart_find_matching_eln(ListBase *shadow_elns, int obindex)
#define DISCARD_NONSENSE_SEGMENTS
void lineart_register_shadow_cuts(LineartData *ld, LineartEdge *e, LineartEdge *shadow_edge)
static void lineart_shadow_finalize_shadow_edges_task(void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
struct LineartShadowFinalizeData LineartShadowFinalizeData
void lineart_main_transform_and_add_shadow(LineartData *ld, LineartElementLinkNode *veln, LineartElementLinkNode *eeln)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float2 fabs(const float2 &a)
unsigned __int64 uint64_t
float cam_obmat_secondary[4][4]
bool use_contour_secondary
bool cam_is_persp_secondary
double view_projection[4][4]
bool shadow_enclose_shapes
double view_vector_secondary[3]
double camera_pos_secondary[3]
bool shadow_use_silhouette
bool allow_overlapping_edges
bool allow_duplicated_types
bool use_back_face_culling
ListBase vertex_buffer_pointers
ListBase line_buffer_pointers
LineartShadowEdge * shadow_edges
ListBase wasted_shadow_cuts
LineartStaticMemPool render_data_pool
struct LineartData::_conf conf
struct LineartData::_geom geom
struct LineartData::_qtree qtree
LineartStaticMemPool * edge_data_pool
struct LineartPendingEdges pending_edges
LineartStaticMemPool * shadow_data_pool
struct LineartEdgeSegment * next
struct LineartTriangle * t2
struct LineartTriangle * t1
struct Object * light_contour_object
struct LineartEdgeSegment * es_ref
struct LineartEdge * e_ref_light_contour
struct LineartEdge * e_ref
struct LineartShadowSegment * next
uint32_t target_reference
struct LineartEdge * testing_e[1]
struct LineartTriangle base
uint32_t target_reference
struct LineartVert * v[3]
double PIL_check_seconds_timer(void)