102 static uint pos_id, selection_id;
103 if (edit_point_format.
attr_len == 0) {
110 *r_selection_id = selection_id;
111 return &edit_point_format;
118 if (cache ==
nullptr) {
140 memset(cache, 0,
sizeof(*cache));
158 if (cache ==
nullptr) {
238 const int num_path_cache_keys,
241 for (
int i = 0; i < num_path_cache_keys; i++) {
255 if ((hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) ||
265 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
290 const int num_uv_layers,
291 const int parent_index,
295 if (psmd ==
nullptr) {
310 const MFace *mfaces =
static_cast<const MFace *
>(
314 "A mesh with polygons should always have a generated 'CD_MFACE' layer!");
317 const MFace *mface = &mfaces[num];
318 for (
int j = 0; j < num_uv_layers; j++) {
326 const int num_col_layers,
327 const int parent_index,
331 if (psmd ==
nullptr) {
346 const MFace *mfaces =
static_cast<const MFace *
>(
350 "A mesh with polygons should always have a generated 'CD_MFACE' layer!");
353 const MFace *mface = &mfaces[num];
354 for (
int j = 0; j < num_col_layers; j++) {
364 const int num_uv_layers,
365 const int child_index,
369 if (psmd ==
nullptr) {
377 int num = particle->
num;
379 const MFace *mfaces =
static_cast<const MFace *
>(
381 const MFace *mface = &mfaces[num];
382 for (
int j = 0; j < num_uv_layers; j++) {
390 const int num_col_layers,
391 const int child_index,
395 if (psmd ==
nullptr) {
403 int num = particle->
num;
405 const MFace *mfaces =
static_cast<const MFace *
>(
407 const MFace *mface = &mfaces[num];
408 for (
int j = 0; j < num_col_layers; j++) {
417 const bool is_simple,
418 const int num_uv_layers,
419 const int parent_index,
420 const int child_index,
422 float (**r_parent_uvs)[2],
425 if (psmd ==
nullptr) {
429 if (r_parent_uvs[parent_index] !=
nullptr) {
430 *r_uv = r_parent_uvs[parent_index];
433 *r_uv =
static_cast<float(*)[2]
>(
434 MEM_callocN(
sizeof(**r_uv) * num_uv_layers,
"Particle UVs"));
438 *r_uv =
static_cast<float(*)[2]
>(
MEM_callocN(
sizeof(**r_uv) * num_uv_layers,
"Particle UVs"));
440 if (child_index == -1) {
443 r_parent_uvs[parent_index] = *r_uv;
452 else if (!r_parent_uvs[psys->
child[child_index].
parent]) {
453 r_parent_uvs[psys->
child[child_index].
parent] = *r_uv;
461 const bool is_simple,
462 const int num_col_layers,
463 const int parent_index,
464 const int child_index,
466 MCol **r_parent_mcol,
469 if (psmd ==
nullptr) {
473 if (r_parent_mcol[parent_index] !=
nullptr) {
474 *r_mcol = r_parent_mcol[parent_index];
477 *r_mcol =
static_cast<MCol *
>(
478 MEM_callocN(
sizeof(**r_mcol) * num_col_layers,
"Particle MCol"));
482 *r_mcol =
static_cast<MCol *
>(
MEM_callocN(
sizeof(**r_mcol) * num_col_layers,
"Particle MCol"));
484 if (child_index == -1) {
487 r_parent_mcol[parent_index] = *r_mcol;
496 else if (!r_parent_mcol[psys->
child[child_index].
parent]) {
497 r_parent_mcol[psys->
child[child_index].
parent] = *r_mcol;
512 const int global_offset,
513 const int start_index,
514 const int num_path_keys,
515 const int num_uv_layers,
516 const int num_col_layers,
521 float (***r_parent_uvs)[2],
522 MCol ***r_parent_mcol,
529 if (is_simple && *r_parent_uvs ==
nullptr) {
531 *r_parent_uvs =
static_cast<float(**)[2]
>(
534 if (is_simple && *r_parent_mcol ==
nullptr) {
535 *r_parent_mcol =
static_cast<MCol **
>(
538 int curr_point = start_index;
539 for (
int i = 0; i < num_path_keys; i++) {
545 float(*uv)[2] =
nullptr;
546 MCol *mcol =
nullptr;
565 for (
int j = 0; j < path->
segments; j++) {
570 sub_v3_v3v3(tangent, path[j + 1].co, path[j - 1].co);
575 if (psmd !=
nullptr) {
576 for (
int k = 0; k < num_uv_layers; k++) {
583 for (
int k = 0; k < num_col_layers; k++) {
597 int global_index = i + global_offset;
602 if (psmd !=
nullptr) {
603 for (
int k = 0; k < num_uv_layers; k++) {
610 for (
int k = 0; k < num_col_layers; k++) {
632 const int num_path_keys,
636 for (
int i = 0; i < num_path_keys; i++) {
641 float total_len = 0.0f;
642 float *co_prev =
nullptr, *seg_data_first;
643 for (
int j = 0; j <= path->
segments; j++) {
647 total_len +=
len_v3v3(co_prev, path[j].co);
650 seg_data_first = seg_data;
652 seg_data[3] = total_len;
653 co_prev = path[j].
co;
657 if (total_len > 0.0f) {
659 for (
int j = 0; j <= path->
segments; j++, seg_data_first += 4) {
660 seg_data_first[3] /= total_len;
670 float edit_key_seg_t = 1.0f / (part->
totkey - 1);
675 float interp = t / edit_key_seg_t;
678 float s1 = hkeys[index].
weight;
679 float s2 = hkeys[index + 1].
weight;
680 return s1 +
interp * (s2 - s1);
687 const int start_index,
688 const int num_path_keys,
692 int curr_point = start_index;
693 for (
int i = 0; i < num_path_keys; i++) {
698 for (
int j = 0; j <= path->
segments; j++) {
705 seg_data->
selection = (weight < 1.0f) ? weight : 1.0f;
721 const int start_index,
722 const int num_path_keys,
726 int curr_point = start_index;
727 for (
int i = 0; i < num_path_keys; i++) {
732 for (
int k = 0; k < res; k++) {
744 const int start_index,
745 const int num_path_keys,
748 float (***r_parent_uvs)[2],
752 MCol ***r_parent_mcol,
759 if (is_simple && *r_parent_uvs ==
nullptr) {
761 *r_parent_uvs =
static_cast<float(**)[2]
>(
764 if (is_simple && *r_parent_mcol ==
nullptr) {
765 *r_parent_mcol =
static_cast<MCol **
>(
768 int curr_point = start_index;
769 for (
int i = 0; i < num_path_keys; i++) {
779 if (psmd !=
nullptr) {
780 float(*uv)[2] =
nullptr;
781 MCol *mcol =
nullptr;
803 for (
int k = 0; k < num_uv_layers; k++) {
807 for (
int k = 0; k < num_col_layers; k++) {
838 point_len =
max_ii(1, point_len);
855 if (psmd !=
nullptr && psmd->
mesh_final !=
nullptr) {
884 float(**parent_uvs)[2] =
nullptr;
885 MCol **parent_mcol =
nullptr;
929 if (i == active_uv) {
933 if (i == render_uv) {
945 cache->
col_tex =
static_cast<GPUTexture **
>(
966 if (i == active_col) {
970 if (i == render_col) {
977 BKE_mesh_tessface_ensure(psmd->mesh_final);
978 if (cache->num_uv_layers) {
979 for (int j = 0; j < cache->num_uv_layers; j++) {
980 mtfaces[j] = (const MTFace *)CustomData_get_layer_n(
981 &psmd->mesh_final->fdata_legacy, CD_MTFACE, j);
985 for (int j = 0; j < cache->num_col_layers; j++) {
986 mcols[j] = (const MCol *)CustomData_get_layer_n(
987 &psmd->mesh_final->fdata_legacy, CD_MCOL, j);
992 if (edit !=
nullptr && edit->pathcache !=
nullptr) {
993 particle_batch_cache_fill_strands_data(psys,
996 PARTICLE_SOURCE_PARENT,
1004 cache->num_uv_layers,
1008 cache->num_col_layers);
1012 if ((psys->pathcache != nullptr) &&
1013 (!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
1015 curr_point = particle_batch_cache_fill_strands_data(psys,
1018 PARTICLE_SOURCE_PARENT,
1026 cache->num_uv_layers,
1030 cache->num_col_layers);
1033 const int child_count = psys->totchild * psys->part->disp / 100;
1034 curr_point = particle_batch_cache_fill_strands_data(psys,
1037 PARTICLE_SOURCE_CHILDREN,
1045 cache->num_uv_layers,
1049 cache->num_col_layers);
1053 if (parent_uvs !=
nullptr) {
1055 for (
int i = 0; i < psys->
totpart; i++) {
1060 if (parent_mcol !=
nullptr) {
1061 for (
int i = 0; i < psys->
totpart; i++) {
1067 for (
int i = 0; i < cache->num_uv_layers; i++) {
1071 for (
int i = 0; i < cache->num_col_layers; i++) {
1091 int element_count = (verts_per_hair + 1) * cache->
strands_len;
1107 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
1122 psys->
childcache, curr_point, child_count, verts_per_hair, &elb);
1159 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
1173 psys->
childcache, child_count, &pos_step, &length_step);
1184 if (hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) {
1196 uint *uv_id =
nullptr;
1197 uint *col_id =
nullptr;
1198 int num_uv_layers = 0;
1199 int num_col_layers = 0;
1202 const MTFace **mtfaces =
nullptr;
1203 const MCol **mcols =
nullptr;
1204 float(**parent_uvs)[2] =
nullptr;
1205 MCol **parent_mcol =
nullptr;
1207 if (psmd !=
nullptr) {
1231 uv_id =
static_cast<uint *
>(
MEM_mallocN(
sizeof(*uv_id) * num_uv_layers,
"UV attr format"));
1232 col_id =
static_cast<uint *
>(
MEM_mallocN(
sizeof(*col_id) * num_col_layers,
"Col attr format"));
1234 for (
int i = 0; i < num_uv_layers; i++) {
1241 SNPRINTF(uuid,
"a%s", attr_safe_name);
1244 if (i == active_uv) {
1249 for (
int i = 0; i < num_col_layers; i++) {
1255 SNPRINTF(uuid,
"a%s", attr_safe_name);
1258 if (i == active_col) {
1270 if (num_uv_layers || num_col_layers) {
1272 if (num_uv_layers) {
1273 mtfaces =
static_cast<const MTFace **
>(
1274 MEM_mallocN(
sizeof(*mtfaces) * num_uv_layers,
"Faces UV layers"));
1275 for (
int i = 0; i < num_uv_layers; i++) {
1280 if (num_col_layers) {
1281 mcols =
static_cast<const MCol **
>(
1282 MEM_mallocN(
sizeof(*mcols) * num_col_layers,
"Color layers"));
1283 for (
int i = 0; i < num_col_layers; i++) {
1290 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
1356 if (parent_uvs !=
nullptr) {
1358 for (
int i = 0; i < psys->
totpart; i++) {
1363 if (parent_mcol !=
nullptr) {
1364 for (
int i = 0; i < psys->
totpart; i++) {
1369 if (num_uv_layers) {
1372 if (num_col_layers) {
1375 if (psmd !=
nullptr) {
1385 if (point_cache->
pos !=
nullptr) {
1390 static uint pos_id, rot_id, val_id;
1406 if (
format.attr_len == 0) {
1416 for (curr_point = 0, i = 0, pa = psys->
particles; i < psys->totpart; i++, pa++) {
1445 if (curr_point != psys->
totpart) {
1456 if (edit->
psys ==
nullptr) {
1489 if (edit !=
nullptr) {
1508 r_draw_source->
object = object;
1509 r_draw_source->
psys = psys;
1510 r_draw_source->
md = md;
1511 r_draw_source->
edit = edit;
1553 if (hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) {
1564 uint pos_id, selection_id;
1573 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
1608 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1625 uint pos_id, selection_id;
1631 int global_key_index = 0;
1632 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1637 for (
int key_index = 0; key_index <
point->totkey - 1; key_index++) {
1668 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1683 uint pos_id, selection_id;
1689 int global_point_index = 0;
1690 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1700 global_point_index++;
1727 bool need_ft_update =
false;
1736 *r_hair_cache = &cache->
hair;
1741 if ((*r_hair_cache)->proc_point_buf ==
nullptr ||
1742 (gpu_material && (*r_hair_cache)->proc_length_buf ==
nullptr))
1747 need_ft_update =
true;
1751 if ((*r_hair_cache)->proc_strand_buf ==
nullptr) {
1757 if ((*r_hair_cache)->final[subdiv].proc_buf ==
nullptr) {
1759 need_ft_update =
true;
1761 if ((*r_hair_cache)->final[subdiv].proc_hairs[thickness_res - 1] ==
nullptr) {
1763 source.
edit, source.
psys, &cache->
hair, thickness_res, subdiv);
1766 return need_ft_update;
CustomData interface, see also DNA_customdata_types.h.
const void * CustomData_get_layer_n(const CustomData *data, eCustomDataType type, int n)
int CustomData_get_named_layer(const CustomData *data, eCustomDataType type, blender::StringRef name)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
const char * CustomData_get_layer_name(const CustomData *data, eCustomDataType type, int n)
int CustomData_get_active_layer(const CustomData *data, eCustomDataType type)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
int CustomData_get_render_layer(const CustomData *data, eCustomDataType type)
int CustomData_number_of_layers(const CustomData *data, eCustomDataType type)
void BKE_mesh_tessface_ensure(Mesh *mesh)
struct ParticleSystemModifierData * psys_get_modifier(struct Object *ob, struct ParticleSystem *psys)
struct ParticleSystem * psys_orig_get(struct ParticleSystem *psys)
void psys_cache_edit_paths(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra, bool use_render_params)
void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float uvco[2])
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys)
@ BKE_PARTICLE_BATCH_DIRTY_ALL
void psys_sim_data_free(struct ParticleSimulationData *sim)
void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc)
void psys_sim_data_init(struct ParticleSimulationData *sim)
bool psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, bool always)
#define BLI_array_alloca(arr, realsize)
#define BLI_assert_msg(a, msg)
MINLINE int max_ii(int a, int b)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
float DEG_get_ctime(const Depsgraph *graph)
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
ID * DEG_get_original_id(ID *id)
Object * DEG_get_original_object(Object *object)
struct ParticleSystem ParticleSystem
#define DRW_TEXTURE_FREE_SAFE(tex)
void PE_update_object(Depsgraph *depsgraph, Scene *scene, Object *ob, int useflag)
PTCacheEdit * PE_create_current(Depsgraph *depsgraph, Scene *scene, Object *ob)
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
#define GPU_batch_create(primitive_type, vertex_buf, index_buf)
#define GPU_BATCH_DISCARD_SAFE(batch)
bool GPU_transform_feedback_support()
#define GPU_INDEXBUF_DISCARD_SAFE(elem)
void GPU_indexbuf_add_primitive_restart(GPUIndexBufBuilder *)
blender::gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void GPU_indexbuf_add_generic_vert(GPUIndexBufBuilder *, uint v)
void GPU_indexbuf_init_ex(GPUIndexBufBuilder *, GPUPrimType, uint index_len, uint vertex_len)
GPUTexture * GPU_texture_create_from_vertbuf(const char *name, blender::gpu::VertBuf *vertex_buf)
void GPU_vertbuf_attr_get_raw_data(blender::gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
#define GPU_vertbuf_create_with_format(format)
void GPU_vertbuf_use(blender::gpu::VertBuf *)
void GPU_vertbuf_data_resize(blender::gpu::VertBuf &verts, uint v_len)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void GPU_vertbuf_attr_set(blender::gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
BPy_StructRNA * depsgraph
const DRWContextState * DRW_context_state_get()
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
struct @157336070235062372277311340362362342103123126032::@132215023242101136103363133227133264017254024241 attr_id
void *(* MEM_mallocN)(size_t len, const char *str)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
#define unit_float_to_ushort_clamp(val)
float BLI_color_from_srgb_table[256]
ccl_device_inline float2 interp(const float2 a, const float2 b, float t)
static void drw_particle_update_ptcache(Object *object_eval, ParticleSystem *psys)
static void count_cache_segment_keys(ParticleCacheKey **pathcache, const int num_path_cache_keys, ParticleHairCache *hair_cache)
void DRW_particle_batch_cache_free(ParticleSystem *psys)
static int particle_batch_cache_fill_strands_data(ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int start_index, const int num_path_keys, GPUVertBufRaw *data_step, GPUVertBufRaw *seg_step, float(***r_parent_uvs)[2], GPUVertBufRaw *uv_step, const MTFace **mtfaces, int num_uv_layers, MCol ***r_parent_mcol, GPUVertBufRaw *col_step, const MCol **mcols, int num_col_layers)
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_inner_points(Object *object, ParticleSystem *psys, PTCacheEdit *edit)
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_tip_points(Object *object, ParticleSystem *psys, PTCacheEdit *edit)
static void drw_particle_update_ptcache_edit(Object *object_eval, ParticleSystem *psys, PTCacheEdit *edit)
static void particle_batch_cache_ensure_procedural_pos(PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, GPUMaterial *)
static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *hair_cache)
static int particle_batch_cache_fill_segments_edit(const PTCacheEdit *, const ParticleData *particle, ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, GPUIndexBufBuilder *elb, GPUVertBufRaw *attr_step)
static bool particle_batch_cache_valid(ParticleSystem *psys)
static GPUVertFormat * edit_points_vert_format_get(uint *r_pos_id, uint *r_selection_id)
static void particle_batch_cache_ensure_edit_tip_pos(PTCacheEdit *edit, ParticleBatchCache *cache)
@ PARTICLE_SOURCE_CHILDREN
blender::gpu::Batch * DRW_particles_batch_cache_get_edit_strands(Object *object, ParticleSystem *psys, PTCacheEdit *edit, bool use_weight)
static void particle_batch_cache_ensure_edit_pos_and_seg(PTCacheEdit *edit, ParticleSystem *psys, ModifierData *, ParticleHairCache *hair_cache, bool use_weight)
static void particle_calculate_uvs(ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_uv_layers, const int parent_index, const int child_index, const MTFace **mtfaces, float(**r_parent_uvs)[2], float(**r_uv)[2])
static void ensure_edit_inner_points_count(const PTCacheEdit *edit, ParticleBatchCache *cache)
blender::gpu::Batch * DRW_particles_batch_cache_get_dots(Object *object, ParticleSystem *psys)
static void particle_batch_cache_clear(ParticleSystem *psys)
static void particle_batch_cache_fill_segments_proc_pos(ParticleCacheKey **path_cache, const int num_path_keys, GPUVertBufRaw *attr_step, GPUVertBufRaw *length_step)
static void particle_interpolate_children_uvs(ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int child_index, const MTFace **mtfaces, float(*r_uv)[2])
static void particle_pack_mcol(MCol *mcol, ushort r_scol[3])
static void particle_batch_cache_ensure_edit_inner_pos(PTCacheEdit *edit, ParticleBatchCache *cache)
static void particle_batch_cache_ensure_procedural_strand_data(PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *cache)
static void drw_particle_get_hair_source(Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, ParticleDrawSource *r_draw_source)
static void particle_batch_cache_clear_point(ParticlePointCache *point_cache)
static void particle_batch_cache_ensure_pos(Object *object, ParticleSystem *psys, ParticlePointCache *point_cache)
static void particle_batch_cache_ensure_procedural_indices(PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, int thickness_res, int subdiv)
bool particles_ensure_procedural_data(Object *object, ParticleSystem *psys, ModifierData *md, ParticleHairCache **r_hair_cache, GPUMaterial *gpu_material, int subdiv, int thickness_res)
static float particle_key_weight(const ParticleData *particle, int strand, float t)
static void particle_calculate_parent_mcol(ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int parent_index, const MCol **mcols, MCol *r_mcol)
static void particle_calculate_mcol(ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_col_layers, const int parent_index, const int child_index, const MCol **mcols, MCol **r_parent_mcol, MCol **r_mcol)
static void particle_batch_cache_init(ParticleSystem *psys)
void DRW_particle_batch_cache_dirty_tag(ParticleSystem *psys, int mode)
static int particle_batch_cache_fill_segments_indices(ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, const int res, GPUIndexBufBuilder *elb)
static ParticleBatchCache * particle_batch_cache_get(ParticleSystem *psys)
static void particle_interpolate_children_mcol(ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int child_index, const MCol **mcols, MCol *r_mcol)
static int particle_batch_cache_fill_segments(ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int global_offset, const int start_index, const int num_path_keys, const int num_uv_layers, const int num_col_layers, const MTFace **mtfaces, const MCol **mcols, uint *uv_id, uint *col_id, float(***r_parent_uvs)[2], MCol ***r_parent_mcol, GPUIndexBufBuilder *elb, HairAttributeID *attr_id, ParticleHairCache *hair_cache)
blender::gpu::Batch * DRW_particles_batch_cache_get_hair(Object *object, ParticleSystem *psys, ModifierData *md)
static void particle_batch_cache_ensure_procedural_final_points(ParticleHairCache *cache, int subdiv)
static void ensure_seg_pt_count(PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *hair_cache)
static void ensure_edit_tip_points_count(const PTCacheEdit *edit, ParticleBatchCache *cache)
static void particle_batch_cache_clear_hair(ParticleHairCache *hair_cache)
static void particle_calculate_parent_uvs(ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int parent_index, const MTFace **mtfaces, float(*r_uv)[2])
static bool is_child(const Object *ob, const Object *parent)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
char * default_color_attribute
char * active_color_attribute
struct ParticleCacheKey ** pathcache
PTCacheEditPoint * points
struct ParticleSystem * psys
GPUTexture * uv_tex[MAX_MTFACE]
blender::gpu::IndexBuf * indices
blender::gpu::VertBuf ** proc_col_buf
blender::gpu::VertBuf * proc_length_buf
blender::gpu::VertBuf * proc_strand_buf
blender::gpu::VertBuf * proc_uv_buf[MAX_MTFACE]
blender::gpu::VertBuf * proc_strand_seg_buf
char uv_layer_names[MAX_MTFACE][MAX_LAYER_NAME_CT][MAX_LAYER_NAME_LEN]
blender::gpu::Batch * hairs
blender::gpu::VertBuf * proc_point_buf
ParticleHairFinalCache final[MAX_HAIR_SUBDIV]
blender::gpu::VertBuf * pos
char(* col_layer_names)[MAX_LAYER_NAME_CT][MAX_LAYER_NAME_LEN]
blender::gpu::VertBuf * proc_buf
blender::gpu::Batch * proc_hairs[MAX_THICKRES]
struct Depsgraph * depsgraph
struct ParticleSystemModifierData * psmd
struct ParticleSystem * psys
struct ParticleSystem * psys
struct ParticleCacheKey ** childcache
struct ParticleCacheKey ** pathcache
gpu::Batch * edit_inner_points
ParticleHairCache edit_hair
gpu::Batch * edit_strands
gpu::VertBuf * edit_inner_pos
gpu::VertBuf * edit_tip_pos
gpu::Batch * edit_tip_points