66 CLAMP(input, 0.0f, 1.0f);
82 for (const int vert : range) {
83 vbo_data[vert] = evaluate_vertex_weight(&dverts[vert], &weight_state);
100 for (const int vert_index : range) {
101 const BMVert &vert = *BM_vert_at_index(&const_cast<BMesh &>(bm), vert_index);
102 vbo_data[vert_index] = evaluate_vertex_weight(
103 static_cast<const MDeformVert *>(BM_ELEM_CD_GET_VOID_P(&vert, offset)), &weight_state);
113 gpu::VertAttrType::SFLOAT_32);
120 if (weight_state.defgroup_active == -1) {
145 gpu::VertAttrType::SFLOAT_32);
constexpr T * data() const
constexpr void fill(const T &value) const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
void draw_subdiv_interp_custom_data(const DRWSubdivCache &cache, gpu::VertBuf &src_data, gpu::VertBuf &dst_data, GPUVertCompType comp_type, int dimensions, int dst_offset)
gpu::VertBufPtr extract_weights_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &batch_cache, MeshBufferCache &cache)
static float evaluate_vertex_weight(const MDeformVert *dvert, const DRW_MeshWeightState *wstate)
static void extract_weights_bm(const MeshRenderData &mr, const DRW_MeshWeightState &weight_state, MutableSpan< float > vbo_data)
gpu::VertBufPtr extract_weights(const MeshRenderData &mr, const MeshBatchCache &batch_cache, MeshBufferCache &cache)
void gather_vert_to_corner_gpu(const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
static void extract_weights_mesh(const MeshRenderData &mr, const DRW_MeshWeightState &weight_state, MutableSpan< float > vbo_data)
@ DRW_MESH_WEIGHT_STATE_MULTIPAINT
@ DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE
@ DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE
std::unique_ptr< gpu::VertBuf, gpu::VertBufDeleter > VertBufPtr
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
bool BKE_defvert_is_weight_zero(const MDeformVert *dvert, int defgroup_tot)
gpu::VertBuf * GPU_vertbuf_create_on_device(const GPUVertFormat &format, uint v_len)
GPUVertFormat GPU_vertformat_from_attribute(StringRef name, gpu::VertAttrType type)
float BKE_defvert_find_weight(const MDeformVert *dvert, int defgroup)
float BKE_defvert_lock_relative_weight(float weight, const MDeformVert *dv, int defbase_num, const bool *defbase_locked, const bool *defbase_unlocked)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
@ OB_DRAW_GROUPUSER_ACTIVE
float BKE_defvert_multipaint_collective_weight(const MDeformVert *dv, int defbase_num, const bool *defbase_sel, int defbase_sel_num, bool is_normalized)
DRW_MeshWeightState weight_state
MeshExtractType extract_type