23#if defined(WITH_METAL_BACKEND)
29#if defined(WITH_METAL_BACKEND)
44 const float uv_prev[2],
46 const float co_prev[3])
78 return 1.0f -
pow2f(1.0f - stretch);
88 float auv[2][2], last_auv[2];
89 float av[2][3], last_av[3];
99 const float(*luv)[2], (*luv_next)[2];
104 BMLoop *l_next_tmp = l_iter;
136 }
while ((l_iter = l_iter->
next) != l_first);
151 float auv[2][2], last_auv[2];
152 float av[2][3], last_av[3];
154 for (
const int face_index : faces.index_range()) {
156 const int corner_end = face.
start() + face.size();
157 for (
int corner = face.start(); corner < corner_end; corner += 1) {
158 int l_next = corner + 1;
159 if (corner == face.start()) {
161 const int corner_last = corner_end - 1;
162 const int l_next_tmp = face.start();
167 positions[corner_verts[corner_last]],
168 positions[corner_verts[l_next_tmp]]);
173 if (l_next == corner_end) {
174 l_next = face.start();
187 positions[corner_verts[corner]],
188 positions[corner_verts[l_next]]);
198 if (
format.attr_len == 0) {
218 if (
format.attr_len == 0) {
260 uv_layers |= (1 << layer);
266 if (uv_layers & (1 << i)) {
int CustomData_get_offset(const CustomData *data, eCustomDataType type)
bool CustomData_layer_is_anonymous(const CustomData *data, eCustomDataType type, int n)
int CustomData_get_active_layer(const CustomData *data, eCustomDataType type)
const char * CustomData_get_active_layer_name(const CustomData *data, eCustomDataType type)
#define BLI_STATIC_ASSERT_ALIGN(st, align)
MINLINE float pow2f(float x)
float angle_normalized_v2v2(const float a[2], const float b[2]) 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 void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float normalize_v2(float n[2])
float angle_normalized_v3v3(const float v1[3], const float v2[3]) ATTR_WARN_UNUSED_RESULT
MINLINE float normalize_v3(float n[3])
void GPU_vertbuf_init_build_on_device(blender::gpu::VertBuf &verts, const GPUVertFormat &format, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
blender::gpu::VertBuf * GPU_vertbuf_calloc()
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_discard(blender::gpu::VertBuf *)
#define BM_ELEM_CD_GET_FLOAT2_P(ele, offset)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMVert * v
constexpr int64_t start() const
draw_view in_light_buf[] float
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])
void extract_edituv_stretch_angle(const MeshRenderData &mr, gpu::VertBuf &vbo)
static void extract_uv_stretch_angle_bm(const MeshRenderData &mr, MutableSpan< UVStretchAngle > vbo_data)
static const GPUVertFormat & get_edituv_stretch_angle_format_subdiv()
static short v2_to_short_angle(const float v[2])
static void extract_uv_stretch_angle_mesh(const MeshRenderData &mr, MutableSpan< UVStretchAngle > vbo_data)
static void edituv_get_edituv_stretch_angle(float auv[2][2], const float av[2][3], UVStretchAngle *r_stretch)
void draw_subdiv_extract_pos_nor(const DRWSubdivCache &cache, gpu::VertBuf *flags_buffer, gpu::VertBuf *pos_nor, gpu::VertBuf *orco)
int subdiv_full_vbo_size(const MeshRenderData &mr, const DRWSubdivCache &cache)
void extract_edituv_stretch_angle_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache, gpu::VertBuf &vbo)
BLI_INLINE const float * bm_vert_co_get(const MeshRenderData &mr, const BMVert *eve)
const GPUVertFormat & draw_subdiv_get_pos_nor_format()
void draw_subdiv_build_edituv_stretch_angle_buffer(const DRWSubdivCache &cache, gpu::VertBuf *pos_nor, gpu::VertBuf *uvs, int uvs_offset, gpu::VertBuf *stretch_angles)
struct blender::draw::MeshBufferList::@247 vbo
Span< float3 > vert_positions
eMRExtractType extract_type
OffsetIndices< int > faces