38 const float uv_prev[2],
40 const float co_prev[3])
72 return 1.0f -
pow2f(1.0f - stretch);
83 if (
format.attr_len == 0) {
107 const int UNUSED(f_index),
123 BMLoop *l_next_tmp = l_iter;
155 }
while ((l_iter = l_iter->
next) != l_first);
160 const int UNUSED(mp_index),
166 for (
int ml_index = mp->
loopstart; ml_index < ml_index_end; ml_index += 1) {
169 int l_next = ml_index + 1;
173 const int ml_index_last = ml_index_end - 1;
178 auv, av,
data->luv[ml_index_last].uv,
data->luv[l_next_tmp].uv,
v->
co, v_next->
co);
183 if (l_next == ml_index_end) {
196 auv, av,
data->luv[ml_index].uv,
data->luv[l_next].uv,
v->
co, v_next->
co);
205 if (
format.attr_len == 0) {
251 uv_layers |= (1 << layer);
257 if (uv_layers & (1 << i)) {
270 subdiv_cache, pos_nor, uvs, uvs_offset, refined_vbo);
typedef float(TangentPoint)[2]
int CustomData_get_active_layer(const struct CustomData *data, int type)
void * CustomData_get_layer(const struct CustomData *data, int type)
int CustomData_get_offset(const struct CustomData *data, int type)
MINLINE float pow2f(float x)
float angle_normalized_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float r[3])
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 void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float normalize_v2(float r[2])
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
void GPU_vertbuf_discard(GPUVertBuf *)
struct GPUVertBuf GPUVertBuf
GPUVertBuf * GPU_vertbuf_calloc(void)
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
void GPU_vertbuf_init_build_on_device(GPUVertBuf *verts, GPUVertFormat *format, uint v_len)
Read Guarded memory(de)allocation.
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_elem_index_get(ele)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void draw_subdiv_build_edituv_stretch_angle_buffer(const DRWSubdivCache *cache, GPUVertBuf *pos_nor, GPUVertBuf *uvs, int uvs_offset, GPUVertBuf *stretch_angles)
GPUVertFormat * draw_subdiv_get_pos_nor_format()
void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache, GPUVertBuf *pos_nor, GPUVertBuf *orco)
ccl_global float * buffer
static void compute_normalize_edge_vectors(float auv[2][2], float av[2][3], const float uv[2], const float uv_prev[2], const float co[3], const float co_prev[3])
static void extract_edituv_stretch_angle_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *cache, void *buffer, void *UNUSED(tls_data))
static short v2_to_short_angle(const float v[2])
static void edituv_get_edituv_stretch_angle(float auv[2][2], const float av[2][3], UVStretchAngle *r_stretch)
constexpr MeshExtract create_extractor_edituv_edituv_stretch_angle()
static GPUVertFormat * get_edituv_stretch_angle_format_subdiv()
static void extract_edituv_stretch_angle_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
static void extract_edituv_stretch_angle_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int UNUSED(f_index), void *_data)
static void extract_edituv_stretch_angle_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int UNUSED(mp_index), void *_data)
DRWSubdivLooseGeom loose_geom
struct MeshBufferList::@272 vbo
GPUVertBuf * edituv_stretch_angle
eMRExtractType extract_type