37 if (
format.attr_len == 0) {
81 }
while ((l_iter = l_iter->
next) != l_first);
86 const int UNUSED(mp_index),
93 for (
int ml_index = mp->
loopstart; ml_index < ml_index_end; ml_index += 1) {
94 const MLoop *ml = &mloop[ml_index];
99 vert->
nor =
data->normals[ml->
v].low;
117 const int ledge_index,
122 int l_index = mr->
loop_len + ledge_index * 2;
132 const int ledge_index,
136 const int ml_index = mr->
loop_len + ledge_index * 2;
140 vert[0].
nor =
data->normals[med->
v1].low;
141 vert[1].
nor =
data->normals[med->
v2].low;
146 const int lvert_index,
152 const int l_index =
offset + lvert_index;
160 const int lvert_index,
166 const int ml_index =
offset + lvert_index;
167 const int v_index = mr->
lverts[lvert_index];
170 vert->
nor =
data->normals[v_index].low;
185 if (
format.attr_len == 0) {
195 if (
format.attr_len == 0) {
223 if (
format.attr_len == 0) {
236 Mesh *coarse_mesh = subdiv_cache->
mesh;
237 const float(*lnors)[3] =
static_cast<const float(*)[3]
>(
253 subdiv_cache, src_custom_normals, dst_custom_normals, 3, 0,
false);
273 subdiv_loop_subdiv_vert_index,
297 struct SubdivPosNorLoop {
308 SubdivPosNorLoop edge_data[2];
309 memset(edge_data, 0,
sizeof(SubdivPosNorLoop) * 2);
318 vbo,
offset *
sizeof(SubdivPosNorLoop),
sizeof(SubdivPosNorLoop) * 2, &edge_data);
323 SubdivPosNorLoop vert_data;
324 memset(&vert_data, 0,
sizeof(SubdivPosNorLoop));
332 vbo,
offset *
sizeof(SubdivPosNorLoop),
sizeof(SubdivPosNorLoop), &vert_data);
381 if (
format.attr_len == 0) {
413 const int UNUSED(f_index),
426 }
while ((l_iter = l_iter->
next) != l_first);
431 const int UNUSED(mp_index),
437 for (
int ml_index = mp->
loopstart; ml_index < ml_index_end; ml_index += 1) {
438 const MLoop *ml = &mloop[ml_index];
462 const int ledge_index,
466 int l_index = mr->
loop_len + ledge_index * 2;
478 const int ledge_index,
482 const int ml_index = mr->
loop_len + ledge_index * 2;
494 const int lvert_index,
500 const int l_index =
offset + lvert_index;
509 const int lvert_index,
515 const int ml_index =
offset + lvert_index;
516 const int v_index = mr->
lverts[lvert_index];
typedef float(TangentPoint)[2]
void * CustomData_get_layer(const struct CustomData *data, int type)
MINLINE void normal_float_to_short_v3(short r[3], const float n[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_short(short r[3], const short a[3])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
void GPU_vertbuf_discard(GPUVertBuf *)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_update_sub(GPUVertBuf *verts, uint start, uint len, const void *data)
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)
void GPU_vertbuf_use(GPUVertBuf *)
Read Guarded memory(de)allocation.
__forceinline ssef high(const avxf &a)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
blender::Span< DRWSubdivLooseVertex > draw_subdiv_cache_get_loose_verts(const DRWSubdivCache *cache)
void draw_subdiv_accumulate_normals(const DRWSubdivCache *cache, GPUVertBuf *pos_nor, GPUVertBuf *face_adjacency_offsets, GPUVertBuf *face_adjacency_lists, GPUVertBuf *vertex_loop_map, GPUVertBuf *vertex_normals)
void draw_subdiv_interp_custom_data(const DRWSubdivCache *cache, GPUVertBuf *src_data, GPUVertBuf *dst_data, int dimensions, int dst_offset, bool compress_to_u16)
void draw_subdiv_finalize_custom_normals(const DRWSubdivCache *cache, GPUVertBuf *src_custom_normals, GPUVertBuf *pos_nor)
GPUVertFormat * draw_subdiv_get_pos_nor_format()
void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache, GPUVertBuf *pos_nor, GPUVertBuf *orco)
GPUVertBuf * draw_subdiv_build_origindex_buffer(int *vert_origindex, uint num_loops)
void draw_subdiv_finalize_normals(const DRWSubdivCache *cache, GPUVertBuf *vertex_normals, GPUVertBuf *subdiv_loop_subdiv_vert_index, GPUVertBuf *pos_nor)
blender::Span< DRWSubdivLooseEdge > draw_subdiv_cache_get_loose_edges(const DRWSubdivCache *cache)
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
static void extract_pos_nor_hq_iter_ledge_bm(const MeshRenderData *mr, const BMEdge *eed, const int ledge_index, void *_data)
static void extract_pos_nor_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), MeshBatchCache *cache, void *buffer, void *UNUSED(data))
static void extract_pos_nor_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int UNUSED(mp_index), void *_data)
static void extract_pos_nor_iter_lvert_mesh(const MeshRenderData *mr, const MVert *mv, const int lvert_index, void *_data)
constexpr MeshExtract create_extractor_pos_nor()
static void extract_pos_nor_iter_ledge_mesh(const MeshRenderData *mr, const MEdge *med, const int ledge_index, void *_data)
static void extract_pos_nor_loose_geom_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), void *buffer, void *UNUSED(data))
static void extract_pos_nor_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int UNUSED(f_index), void *_data)
static void extract_pos_nor_hq_iter_lvert_bm(const MeshRenderData *mr, const BMVert *eve, const int lvert_index, void *_data)
static GPUVertFormat * get_custom_normals_format()
static void extract_pos_nor_hq_iter_lvert_mesh(const MeshRenderData *mr, const MVert *mv, const int lvert_index, void *_data)
static void extract_pos_nor_hq_iter_ledge_mesh(const MeshRenderData *mr, const MEdge *med, const int ledge_index, void *_data)
constexpr MeshExtract create_extractor_pos_nor_hq()
static void extract_pos_nor_iter_lvert_bm(const MeshRenderData *mr, const BMVert *eve, const int lvert_index, void *_data)
static void extract_pos_nor_hq_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int UNUSED(mp_index), void *_data)
static void extract_pos_nor_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
static GPUVertFormat * get_normals_format()
static void extract_pos_nor_finish(const MeshRenderData *UNUSED(mr), MeshBatchCache *UNUSED(cache), void *UNUSED(buf), void *_data)
static void extract_pos_nor_hq_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int UNUSED(f_index), void *_data)
static void extract_pos_nor_iter_ledge_bm(const MeshRenderData *mr, const BMEdge *eed, const int ledge_index, void *_data)
static void extract_pos_nor_hq_finish(const MeshRenderData *UNUSED(mr), MeshBatchCache *UNUSED(cache), void *UNUSED(buf), void *_data)
static void extract_pos_nor_hq_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
struct GPUVertBuf * subdiv_vertex_face_adjacency_offsets
bool use_custom_loop_normals
int * subdiv_loop_subdiv_vert_index
DRWSubdivLooseGeom loose_geom
struct GPUVertBuf * subdiv_vertex_face_adjacency
DRWSubdivLooseVertex * verts
struct MeshBufferList::@272 vbo
eMRExtractType extract_type
const float(* vert_normals)[3]