133 static uint pos_id, selection_id;
141 *r_selection_id = selection_id;
142 return &edit_point_format;
149 if (cache ==
nullptr) {
167 cache = MEM_new<ParticleBatchCache>(__func__);
190 if (cache ==
nullptr) {
247 MEM_delete(batch_cache);
253 for (
const auto &particle :
parent) {
256 for (
const auto &particle :
children) {
282 if (!points_by_curve_storage_.is_empty()) {
283 return points_by_curve_storage_.as_span();
287 points_by_curve_storage_.append(total);
289 total += strand.
size();
290 points_by_curve_storage_.append(total);
292 return points_by_curve_storage_.as_span();
297 if (additional_subdivision_ == 0) {
301 if (!evaluated_points_by_curve_storage_.is_empty()) {
302 return evaluated_points_by_curve_storage_.as_span();
307 evaluated_points_by_curve_storage_.append(total);
309 int size = strand.
size();
310 total += (size > 1) ? size * segment_multiplier : 1;
311 evaluated_points_by_curve_storage_.append(total);
313 return evaluated_points_by_curve_storage_.as_span();
317 const int num_path_cache_keys,
320 for (
int i = 0; i < num_path_cache_keys; i++) {
334 if (hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) {
342 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
371 const int num_uv_layers,
372 const int parent_index,
376 if (psmd ==
nullptr) {
391 const MFace *mfaces =
static_cast<const MFace *
>(
393 if (mfaces ==
nullptr) [[unlikely]] {
395 "A mesh with polygons should always have a generated 'CD_MFACE' layer!");
399 for (
int j = 0; j < num_uv_layers; j++) {
407 const int num_col_layers,
408 const int parent_index,
412 if (psmd ==
nullptr) {
427 const MFace *mfaces =
static_cast<const MFace *
>(
429 if (mfaces ==
nullptr) [[unlikely]] {
431 "A mesh with polygons should always have a generated 'CD_MFACE' layer!");
435 for (
int j = 0; j < num_col_layers; j++) {
445 const int num_uv_layers,
446 const int child_index,
450 if (psmd ==
nullptr) {
460 const MFace *mfaces =
static_cast<const MFace *
>(
463 for (
int j = 0; j < num_uv_layers; j++) {
471 const int num_col_layers,
472 const int child_index,
476 if (psmd ==
nullptr) {
486 const MFace *mfaces =
static_cast<const MFace *
>(
489 for (
int j = 0; j < num_col_layers; j++) {
498 const bool is_simple,
499 const int num_uv_layers,
500 const int parent_index,
501 const int child_index,
503 float (**r_parent_uvs)[2],
506 if (psmd ==
nullptr) {
510 if (r_parent_uvs[parent_index] !=
nullptr) {
511 *r_uv = r_parent_uvs[parent_index];
520 if (child_index == -1) {
523 r_parent_uvs[parent_index] = *r_uv;
532 else if (!r_parent_uvs[psys->
child[child_index].
parent]) {
533 r_parent_uvs[psys->
child[child_index].
parent] = *r_uv;
541 const bool is_simple,
542 const int num_col_layers,
543 const int parent_index,
544 const int child_index,
546 MCol **r_parent_mcol,
549 if (psmd ==
nullptr) {
553 if (r_parent_mcol[parent_index] !=
nullptr) {
554 *r_mcol = r_parent_mcol[parent_index];
563 if (child_index == -1) {
566 r_parent_mcol[parent_index] = *r_mcol;
575 else if (!r_parent_mcol[psys->
child[child_index].
parent]) {
576 r_parent_mcol[psys->
child[child_index].
parent] = *r_mcol;
591 const int global_offset,
592 const int start_index,
593 const int num_path_keys,
594 const int num_uv_layers,
595 const int num_col_layers,
600 float (***r_parent_uvs)[2],
601 MCol ***r_parent_mcol,
608 if (is_simple && *r_parent_uvs ==
nullptr) {
612 if (is_simple && *r_parent_mcol ==
nullptr) {
615 int curr_point = start_index;
616 for (
int i = 0; i < num_path_keys; i++) {
622 float (*uv)[2] =
nullptr;
623 MCol *mcol =
nullptr;
642 for (
int j = 0; j < path->
segments; j++) {
647 sub_v3_v3v3(tangent, path[j + 1].co, path[j - 1].co);
652 if (psmd !=
nullptr) {
653 for (
int k = 0; k < num_uv_layers; k++) {
658 (is_simple && is_child) ? (*r_parent_uvs)[psys->
child[i].
parent][k] : uv[k]);
660 for (
int k = 0; k < num_col_layers; k++) {
664 (is_simple && is_child) ? &(*r_parent_mcol)[psys->
child[i].
parent][k] : &mcol[k],
674 int global_index = i + global_offset;
679 if (psmd !=
nullptr) {
680 for (
int k = 0; k < num_uv_layers; k++) {
684 (is_simple && is_child) ? (*r_parent_uvs)[psys->
child[i].
parent][k] :
687 for (
int k = 0; k < num_col_layers; k++) {
712 float edit_key_seg_t = 1.0f / (part->
totkey - 1);
717 float interp = t / edit_key_seg_t;
722 return s1 +
interp * (s2 - s1);
729 const int start_index,
730 const int num_path_keys,
734 int curr_point = start_index;
735 for (
int i = 0; i < num_path_keys; i++) {
740 for (
int j = 0; j <= path->
segments; j++) {
747 seg_data->
selection = (weight < 1.0f) ? weight : 1.0f;
767 if (hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) {
779 uint *uv_id =
nullptr;
780 uint *col_id =
nullptr;
782 int num_col_layers = 0;
783 const MTFace **mtfaces =
nullptr;
784 const MCol **mcols =
nullptr;
785 float (**parent_uvs)[2] =
nullptr;
786 MCol **parent_mcol =
nullptr;
789 if (psmd !=
nullptr) {
796 num_col_layers = color_attribute_names.
size();
798 int num_uv_layers = uv_map_names.
size();
810 for (
int i = 0; i < num_uv_layers; i++) {
812 char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
819 if (name == active_uv) {
824 for (
int i = 0; i < num_col_layers; i++) {
825 const StringRef name = color_attribute_names[i];
826 char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
832 if (name == active_col) {
838 hair_cache->
pos = GPU_vertbuf_create_with_format(format);
844 if (num_uv_layers || num_col_layers) {
848 for (
int i = 0; i < num_uv_layers; i++) {
849 mtfaces[i] =
static_cast<const MTFace *
>(
853 if (num_col_layers) {
855 for (
int i = 0; i < num_col_layers; i++) {
856 mcols[i] =
static_cast<const MCol *
>(
862 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
928 if (parent_uvs !=
nullptr) {
930 for (
int i = 0; i < psys->
totpart; i++) {
931 MEM_SAFE_DELETE(parent_uvs[i]);
933 MEM_delete(parent_uvs);
935 if (parent_mcol !=
nullptr) {
936 for (
int i = 0; i < psys->
totpart; i++) {
937 MEM_SAFE_DELETE(parent_mcol[i]);
939 MEM_delete(parent_mcol);
944 if (num_col_layers) {
947 if (psmd !=
nullptr) {
957 if (point_cache->
pos !=
nullptr) {
976 static uint pos_id, rot_id, val_id;
985 point_cache->
pos = GPU_vertbuf_create_with_format(format);
988 for (curr_point = 0, i = 0, pa = psys->
particles; i < psys->totpart; i++, pa++) {
1017 if (curr_point != psys->
totpart) {
1028 if (edit->
psys ==
nullptr) {
1042 Depsgraph *depsgraph = draw_ctx->
depsgraph;
1061 if (edit !=
nullptr) {
1070 const int additional_subdivision)
1123 if (hair_cache->
pos !=
nullptr && hair_cache->
indices !=
nullptr) {
1134 uint pos_id, selection_id;
1137 hair_cache->
pos = GPU_vertbuf_create_with_format(*edit_point_format);
1143 if (edit !=
nullptr && edit->
pathcache !=
nullptr) {
1178 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1195 uint pos_id, selection_id;
1198 cache->
edit_inner_pos = GPU_vertbuf_create_with_format(*edit_point_format);
1201 int global_key_index = 0;
1202 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1207 for (
int key_index = 0; key_index < point->
totkey - 1; key_index++) {
1238 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1253 uint pos_id, selection_id;
1256 cache->
edit_tip_pos = GPU_vertbuf_create_with_format(*edit_point_format);
1259 int global_point_index = 0;
1260 for (
int point_index = 0; point_index < edit->
totpoint; point_index++) {
1270 global_point_index++;
1295 if (particle.
num < face_count_legacy) {
1302 return particle.
num;
1313 std::swap(col[0], col[2]);
1317template<
typename ParticleDataT>
1322 return float4(0, 0, 0, 1);
1330template<
typename ParticleDataT>
1344 std::optional<StringRef> name;
1362 mesh.totface_legacy * (std::is_same_v<T, MCol> ? 4 : 1)};
1369 mesh.totface_legacy};
1372template<
typename InputT,
typename OutputT, eCustomDataType data_type>
1398 int curve_index = 0;
1408 if (part_spans.
parent.is_empty()) {
1434 bool &r_is_point_domain)
1436 using namespace bke;
1438 r_is_point_domain =
false;
1444 if (meta_data->data_type == AttrType::ColorByte) {
1447 if (meta_data->data_type == AttrType::Float2) {
1462 char sampler_name[32];
1510 for (
const int i :
IndexRange(GPU_MAX_ATTR)) {
1553 float radius = 1.0f - time;
1555 radius =
powf(radius, 1.0f + shape);
1558 radius =
powf(radius, 1.0f / (1.0f - shape));
1560 return (radius * (root - tip)) + tip;
1586 const float hair_rad_shape = part.
shape;
1587 const float hair_rad_root = part.rad_root * part.rad_scale * 0.5f;
1588 const float hair_rad_tip = part.rad_tip * part.rad_scale * 0.5f;
1595 points_pos[i] = point.co;
1596 points_rad[i] = (hair_close_tip && (j == strand.index_range().last())) ?
1599 hair_rad_shape, hair_rad_root, hair_rad_tip, point.time);
1608 module.evaluate_positions(true,
1615 std::move(points_pos_buf),
1616 std::move(points_rad_buf),
1617 evaluated_pos_rad_buf,
1624 module.evaluate_curve_length_intercept(false, src.curves_num(), *this);
1629 int face_per_segment)
1631 const bool is_ribbon = face_per_segment < 2;
1635 if (indirection_buf) {
1636 return indirection_buf;
1642 return indirection_buf;
1647 indirection_buf =
module.evaluate_topology_indirection(
1648 src.curves_num(), src.evaluated_points_num(), *this, is_ribbon, false);
1650 return indirection_buf;
CustomData interface, see also DNA_customdata_types.h.
#define SNPRINTF_UTF8(dst, format,...)
Object groups, one object can be in many groups at once.
#define GPU_batch_create(primitive_type, vertex_buf, index_buf)
#define GPU_BATCH_DISCARD_SAFE(batch)
#define GPU_INDEXBUF_DISCARD_SAFE(elem)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
Read Blender memory allocation and freeing.
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
constexpr IndexRange()=default
constexpr Span slice(int64_t start, int64_t size) const
constexpr const T * data() const
constexpr int64_t size() const
static VArray from_single(T value, const int64_t size)
IndexRange index_range() const
void append(const T &value)
void reserve(const int64_t min_capacity)
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
bool contains(StringRef name) const
std::optional< AttributeMetaData > lookup_meta_data(StringRef name) const
constexpr bool is_empty() const
static VertBufPtr device_only(uint size)
static VertBufPtr from_varray(const VArray< T > &array)
static VertBufPtr from_size(const int size, GPUUsageType usage=GPU_USAGE_STATIC)
static VertBufPtr from_span(const Span< T > data)
Utilities for rendering attributes.
ccl_device_inline uint particle_index(KernelGlobals kg, const int particle)
ccl_device_inline float interp(const float a, const float b, const float t)
void drw_particle_update_ptcache(Object *object_eval, ParticleSystem *psys)
void drw_attributes_add_request(VectorSet< std::string > *attrs, const StringRef name)
static void count_cache_segment_keys(ParticleCacheKey **pathcache, const int num_path_cache_keys, ParticleHairCache *hair_cache)
static float4 particle_mcol_convert(const MCol &mcol)
void DRW_particle_batch_cache_free(ParticleSystem *psys)
CurvesEvalCache & hair_particle_get_eval_cache(ParticleDrawSource &src)
gpu::Batch * DRW_particles_batch_cache_get_edit_inner_points(Object *object, ParticleSystem *psys, PTCacheEdit *edit)
ParticleDrawSource drw_particle_get_hair_source(Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, const int additional_subdivision)
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_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 void particle_batch_cache_ensure_edit_tip_pos(PTCacheEdit *edit, ParticleBatchCache *cache)
@ PARTICLE_SOURCE_CHILDREN
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)
gpu::Batch * DRW_particles_batch_cache_get_dots(Object *object, ParticleSystem *psys)
static std::optional< StringRef > get_first_uv_name(const bke::AttributeAccessor &attributes)
static void particle_batch_cache_clear(ParticleSystem *psys)
Span< T > span_from_custom_data_layer(const Mesh &mesh, const eCustomDataType type, const StringRef name)
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 int particle_mface_index(const ParticleData &particle, int face_count_legacy)
static void particle_batch_cache_ensure_edit_inner_pos(PTCacheEdit *edit, ParticleBatchCache *cache)
void drw_curves_get_attribute_sampler_name(const StringRef layer_name, char r_sampler_name[32])
static void particle_batch_cache_clear_point(ParticlePointCache *point_cache)
static void particle_batch_cache_ensure_pos(Object *object, ParticleSystem *psys, ParticlePointCache *point_cache)
bool drw_attributes_overlap(const VectorSet< std::string > *a, const VectorSet< std::string > *b)
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 gpu::VertBufPtr ensure_curve_attribute(ParticleDrawSource &src, const Mesh &mesh, const StringRef name, bool &r_is_point_domain)
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 gpu::VertBufPtr interpolate_face_corner_attribute_to_curve(ParticleDrawSource &src, const StringRef name)
static void particle_batch_cache_init(ParticleSystem *psys)
void DRW_particle_batch_cache_dirty_tag(ParticleSystem *psys, int mode)
static float4 interpolate(const ParticleDataT &particle, Span< MFace > mfaces, Span< MCol > mcols)
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)
void drw_attributes_merge(VectorSet< std::string > *dst, const VectorSet< std::string > *src)
gpu::Batch * DRW_particles_batch_cache_get_hair(Object *object, ParticleSystem *psys, ModifierData *md)
static float hair_shape_radius(float shape, float root, float tip, float time)
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 const GPUVertFormat * edit_points_vert_format_get(uint *r_pos_id, uint *r_selection_id)
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])
std::unique_ptr< gpu::VertBuf, gpu::VertBufDeleter > VertBufPtr
T clamp(const T &a, const T &min, const T &max)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void GPU_vertformat_alias_add(GPUVertFormat *, StringRef alias)
void GPU_indexbuf_init_ex(GPUIndexBufBuilder *, GPUPrimType, uint index_len, uint vertex_len)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool assign_if_different(T &old_value, T &&new_value)
void psys_sim_data_init(struct ParticleSimulationData *sim)
void GPU_indexbuf_add_primitive_restart(GPUIndexBufBuilder *)
struct ParticleSystem * psys_orig_get(struct ParticleSystem *psys)
MatBase< float, 4, 4 > float4x4
struct ParticleSystemModifierData * psys_get_modifier(struct Object *ob, struct ParticleSystem *psys)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void PE_update_object(Depsgraph *depsgraph, Scene *scene, Object *ob, int useflag)
VecBase< float, 4 > float4
float BLI_color_from_srgb_table[256]
bool psys_in_edit_mode(struct Depsgraph *depsgraph, const struct ParticleSystem *psys)
gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
VecBase< float, 2 > float2
bool psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, bool always)
void GPU_vertformat_safe_attr_name(StringRef attr_name, char *r_safe_name, uint max_len)
BLI_INLINE void IMB_colormanagement_rec709_to_scene_linear(float scene_linear[3], const float rec709[3])
BMesh const char void * data
void GPU_vertbuf_attr_set(gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
ListBaseT< GPUMaterialAttribute > GPU_material_attributes(const GPUMaterial *material)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
ATTR_WARN_UNUSED_RESULT const size_t num
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc)
void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float r_uv[2])
const DRWContext * DRW_context_get()
void GPU_vertbuf_attr_get_raw_data(gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
const void * CustomData_get_layer_n(const CustomData *data, eCustomDataType type, int n)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
T * DEG_get_original(T *id)
MINLINE unsigned short unit_float_to_ushort_clamp(float val)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_data_resize(gpu::VertBuf &verts, uint v_len)
void BKE_mesh_tessface_ensure(Mesh *mesh)
void psys_cache_edit_paths(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct PTCacheEdit *edit, float cfra, bool use_render_params)
void GPU_indexbuf_add_generic_vert(GPUIndexBufBuilder *, uint v)
VecBase< float, 3 > float3
PTCacheEdit * PE_create_current(Depsgraph *depsgraph, Scene *scene, Object *ob)
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
int CustomData_get_named_layer(const CustomData *data, eCustomDataType type, StringRef name)
float DEG_get_ctime(const Depsgraph *graph)
@ GPU_USAGE_FLAG_BUFFER_TEXTURE_ONLY
void psys_sim_data_free(struct ParticleSimulationData *sim)
@ BKE_PARTICLE_BATCH_DIRTY_ALL
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
char * active_color_attribute
struct PTCacheEditKey * keys
PTCacheEditPoint * points
struct ParticleSystem * psys
struct ParticleCacheKey ** pathcache
eParticleChildType childtype
eParticleDrawCol draw_col
struct Depsgraph * depsgraph
struct ParticleSystem * psys
struct ParticleSystemModifierData * psmd
struct ParticleSystem * psys
draw::ParticleBatchCache * batch_cache
struct ParticleCacheKey ** childcache
struct ParticleCacheKey ** pathcache
eParticleSystem_Flag flag
gpu::VertBufPtr curves_cyclic_buf
gpu::VertBufPtr evaluated_time_buf
gpu::VertBufPtr curves_resolution_buf
gpu::VertBufPtr indirection_ribbon_buf
gpu::VertBufPtr curves_length_buf
std::array< bool, GPU_MAX_ATTR > attributes_point_domain
gpu::VertBufPtr curves_type_buf
void ensure_common(const bke::CurvesGeometry &curves)
gpu::VertBufPtr indirection_cylinder_buf
gpu::VertBufPtr & indirection_buf_get(CurvesModule &module, const bke::CurvesGeometry &curves, int face_per_segment)
gpu::VertBufPtr evaluated_pos_rad_buf
gpu::VertBufPtr evaluated_points_by_curve_buf
void ensure_attributes(struct CurvesModule &module, const bke::CurvesGeometry &curves, const GPUMaterial *gpu_material)
void ensure_positions(CurvesModule &module, const bke::CurvesGeometry &curves)
gpu::VertBufPtr curve_attributes_buf[GPU_MAX_ATTR]
VectorSet< std::string > attr_used_over_time
gpu::VertBufPtr points_by_curve_buf
VectorSet< std::string > attr_used
void ensure_attribute(struct CurvesModule &module, const bke::CurvesGeometry &curves, StringRef name, int index)
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
ParticleDrawSource(Vector< int > &points_by_curve_storage, Vector< int > &evaluated_points_by_curve_storage, int additional_subdivision)
OffsetIndices< int > evaluated_points_by_curve()
int evaluated_points_num()
ParticleSpans particles_get()
OffsetIndices< int > points_by_curve()
Vector< int > evaluated_points_by_curve_storage
CurvesEvalCache eval_cache
Vector< int > points_by_curve_storage
gpu::Batch * proc_hairs[MAX_THICKRES]
void foreach_strand(FunctionRef< void(Span< ParticleCacheKey >)> callback)
Span< ParticleCacheKey * > parent
Span< ParticleCacheKey * > children