32 const float v_next_co[3])
34 float enor[3], evec[3];
52 if (
format.attr_len == 0) {
62 data->edge_loop_count =
static_cast<uchar *
>(
68 for (
int e_index = 0; e_index < mr->
edge_len; e_index++, med++) {
70 data->use_edge_render =
true;
77 data->use_edge_render =
true;
99 data->vbo_data[l_index] = ratio * 253 + 1;
102 data->vbo_data[l_index] = 255;
104 }
while ((l_iter = l_iter->
next) != l_first);
116 for (
int ml_index = mp->
loopstart; ml_index < ml_index_end; ml_index += 1) {
117 const MLoop *ml = &mloop[ml_index];
119 if (
data->use_edge_render) {
126 if (
data->edge_loop_count[ml->
e] < 3) {
127 data->edge_loop_count[ml->
e]++;
129 if (
data->edge_loop_count[ml->
e] == 2) {
132 const int ml_index_other = (ml_index == ml_index_last) ? mp->
loopstart : (ml_index + 1);
133 const MLoop *ml_next = &mr->
mloop[ml_index_other];
138 data->vbo_data[ml_index] = ratio * 253 + 1;
142 data->vbo_data[ml_index] = 255;
150 const int ledge_index,
154 data->vbo_data[mr->
loop_len + (ledge_index * 2) + 0] = 255;
155 data->vbo_data[mr->
loop_len + (ledge_index * 2) + 1] = 255;
160 const int ledge_index,
165 data->vbo_data[mr->
loop_len + ledge_index * 2 + 0] = 255;
166 data->vbo_data[mr->
loop_len + ledge_index * 2 + 1] = 255;
182 if (
format.attr_len == 0) {
194 for (
int ml_index = 0; ml_index < buf_len; ml_index++, fdata++) {
195 *fdata =
data->vbo_data[ml_index] / 255.0f;
208 if (
format.attr_len == 0) {
233 const bool has_edge_idx = edge_idx !=
nullptr;
236 loop_edge_idx = edge_idx;
270 for (
int i = 0; i < loose_geom.
edge_len; i++) {
272 float loose_edge_fac[2] = {1.0f, 1.0f};
276 char loose_edge_fac[2] = {255, 255};
MINLINE float normalize_v3(float r[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
bool GPU_crappy_amd_driver(void)
_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 *)
void * GPU_vertbuf_steal_data(GPUVertBuf *verts)
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_clear(GPUVertBuf *verts)
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.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
BLI_INLINE bool BM_edge_is_manifold(const BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void draw_subdiv_init_origindex_buffer(GPUVertBuf *buffer, int32_t *vert_origindex, uint num_loops, uint loose_len)
void draw_subdiv_build_edge_fac_buffer(const DRWSubdivCache *cache, GPUVertBuf *pos_nor, GPUVertBuf *edge_idx, GPUVertBuf *edge_fac)
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_callocN)(size_t len, const char *str)
constexpr MeshExtract create_extractor_edge_fac()
static void extract_edge_fac_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int UNUSED(f_index), void *_data)
static void extract_edge_fac_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
static void extract_edge_fac_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int mp_index, void *_data)
static float loop_edge_factor_get(const float f_no[3], const float v_co[3], const float v_no[3], const float v_next_co[3])
static void extract_edge_fac_iter_ledge_mesh(const MeshRenderData *mr, const MEdge *UNUSED(med), const int ledge_index, void *_data)
static void extract_edge_fac_finish(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *_data)
static void extract_edge_fac_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), MeshBatchCache *cache, void *buffer, void *UNUSED(data))
static void extract_edge_fac_iter_ledge_bm(const MeshRenderData *mr, const BMEdge *UNUSED(eed), const int ledge_index, void *_data)
static void extract_edge_fac_loose_geom_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), void *buffer, void *UNUSED(data))
static GPUVertFormat * get_subdiv_edge_fac_format()
struct GPUVertBuf * edges_orig_index
DRWSubdivLooseGeom loose_geom
struct MeshBufferList::@272 vbo
eMRExtractType extract_type
const float(* poly_normals)[3]
const float(* vert_normals)[3]