diff options
Diffstat (limited to 'source/blender/draw/engines/gpencil')
5 files changed, 114 insertions, 113 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c index 70e679d4e72..1f3874e70ba 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c @@ -155,41 +155,41 @@ void DRW_gpencil_get_stroke_geom(struct GpencilBatchCacheElem *be, bGPDstroke *g if (i == 0) { if (gps->flag & GP_STROKE_CYCLIC && totpoints > 2) { gpencil_set_stroke_point( - be->vbo, &points[totpoints - 1], be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, &points[totpoints - 1], be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; } else { gpencil_set_stroke_point( - be->vbo, &points[1], be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, &points[1], be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; } } /* set point */ gpencil_set_stroke_point( - be->vbo, pt, be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, pt, be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; } if (gps->flag & GP_STROKE_CYCLIC && totpoints > 2) { /* draw line to first point to complete the cycle */ gpencil_set_stroke_point( - be->vbo, &points[0], be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, &points[0], be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; /* now add adjacency point (not drawn) */ gpencil_set_stroke_point( - be->vbo, &points[1], be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, &points[1], be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; } /* last adjacency point (not drawn) */ else { gpencil_set_stroke_point( - be->vbo, &points[totpoints - 2], be->vbo_len, - be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); + be->vbo, &points[totpoints - 2], be->vbo_len, + be->pos_id, be->color_id, be->thickness_id, be->uvdata_id, thickness, ink); be->vbo_len++; } } @@ -223,8 +223,8 @@ void DRW_gpencil_get_fill_geom(struct GpencilBatchCacheElem *be, Object *ob, bGP for (int i = 0; i < gps->tot_triangles; i++, stroke_triangle++) { for (int j = 0; j < 3; j++) { gpencil_set_fill_point( - be->vbo, be->vbo_len, &gps->points[stroke_triangle->verts[j]], color, stroke_triangle->uv[j], - be->pos_id, be->color_id, be->uvdata_id); + be->vbo, be->vbo_len, &gps->points[stroke_triangle->verts[j]], color, stroke_triangle->uv[j], + be->pos_id, be->color_id, be->uvdata_id); be->vbo_len++; } } @@ -277,15 +277,15 @@ GPUBatch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness) if (gpd->runtime.sbuffer_sflag & GP_STROKE_CYCLIC && totpoints > 2) { ED_gpencil_tpoint_to_point(ar, origin, &points[totpoints - 1], &pt2); gpencil_set_stroke_point( - vbo, &pt2, idx, - pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); + vbo, &pt2, idx, + pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); idx++; } else { ED_gpencil_tpoint_to_point(ar, origin, &points[1], &pt2); gpencil_set_stroke_point( - vbo, &pt2, idx, - pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); + vbo, &pt2, idx, + pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); idx++; } } @@ -302,22 +302,22 @@ GPUBatch *DRW_gpencil_get_buffer_stroke_geom(bGPdata *gpd, short thickness) /* draw line to first point to complete the cycle */ ED_gpencil_tpoint_to_point(ar, origin, &points[0], &pt2); gpencil_set_stroke_point( - vbo, &pt2, idx, - pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); + vbo, &pt2, idx, + pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); idx++; /* now add adjacency point (not drawn) */ ED_gpencil_tpoint_to_point(ar, origin, &points[1], &pt3); gpencil_set_stroke_point( - vbo, &pt3, idx, - pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); + vbo, &pt3, idx, + pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); idx++; } /* last adjacency point (not drawn) */ else { ED_gpencil_tpoint_to_point(ar, origin, &points[totpoints - 2], &pt2); gpencil_set_stroke_point( - vbo, &pt2, idx, - pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); + vbo, &pt2, idx, + pos_id, color_id, thickness_id, uvdata_id, thickness, gpd->runtime.scolor); idx++; } diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 9ed86cb10c3..ce01044a885 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -999,8 +999,8 @@ static void gpencil_draw_strokes( ((gps->flag & GP_STROKE_NOFILL) == 0)) { gpencil_add_fill_vertexdata( - cache, ob, gpl, derived_gpf, gps, - opacity, tintcolor, false, custonion); + cache, ob, gpl, derived_gpf, gps, + opacity, tintcolor, false, custonion); } /* stroke */ /* No fill strokes, must show stroke always */ @@ -1015,8 +1015,8 @@ static void gpencil_draw_strokes( } gpencil_add_stroke_vertexdata( - cache, ob, gpl, derived_gpf, gps, - opacity, tintcolor, false, custonion); + cache, ob, gpl, derived_gpf, gps, + opacity, tintcolor, false, custonion); } } } @@ -1378,15 +1378,15 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T if (gpd->runtime.sbuffer_size > 1) { if ((gp_style) && (gp_style->mode == GP_STYLE_MODE_LINE)) { stl->g_data->shgrps_drawing_stroke = DRW_gpencil_shgroup_stroke_create( - e_data, vedata, psl->drawing_pass, e_data->gpencil_stroke_sh, NULL, - gpd, NULL, NULL, gp_style, -1, - false, 1.0f, (const int *)stl->storage->shade_render); + e_data, vedata, psl->drawing_pass, e_data->gpencil_stroke_sh, NULL, + gpd, NULL, NULL, gp_style, -1, + false, 1.0f, (const int *)stl->storage->shade_render); } else { stl->g_data->shgrps_drawing_stroke = DRW_gpencil_shgroup_point_create( - e_data, vedata, psl->drawing_pass, e_data->gpencil_point_sh, NULL, - gpd, NULL, gp_style, -1, - false, 1.0f, (const int *)stl->storage->shade_render); + e_data, vedata, psl->drawing_pass, e_data->gpencil_point_sh, NULL, + gpd, NULL, gp_style, -1, + false, 1.0f, (const int *)stl->storage->shade_render); } /* clean previous version of the batch */ @@ -1399,18 +1399,18 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T /* use unit matrix because the buffer is in screen space and does not need conversion */ if (gpd->runtime.mode == GP_STYLE_MODE_LINE) { e_data->batch_buffer_stroke = DRW_gpencil_get_buffer_stroke_geom( - gpd, lthick); + gpd, lthick); } else { e_data->batch_buffer_stroke = DRW_gpencil_get_buffer_point_geom( - gpd, lthick); + gpd, lthick); } /* buffer strokes, must show stroke always */ DRW_shgroup_call_add( - stl->g_data->shgrps_drawing_stroke, - e_data->batch_buffer_stroke, - stl->storage->unit_matrix); + stl->g_data->shgrps_drawing_stroke, + e_data->batch_buffer_stroke, + stl->storage->unit_matrix); if ((gpd->runtime.sbuffer_size >= 3) && (gpd->runtime.sfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) && @@ -1423,7 +1423,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T gpd->runtime.sfill[3] = 0.5f; } stl->g_data->shgrps_drawing_fill = DRW_shgroup_create( - e_data->gpencil_drawing_fill_sh, psl->drawing_pass); + e_data->gpencil_drawing_fill_sh, psl->drawing_pass); /* clean previous version of the batch */ if (stl->storage->buffer_fill) { @@ -1453,7 +1453,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T ((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0)) { DRWShadingGroup *shgrp = DRW_shgroup_create( - e_data->gpencil_edit_point_sh, psl->drawing_pass); + e_data->gpencil_edit_point_sh, psl->drawing_pass); const float *viewport_size = DRW_viewport_size_get(); DRW_shgroup_uniform_vec2(shgrp, "Viewport", viewport_size, 1); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index d3afe4e3cc4..5f2652b0bfb 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -125,10 +125,10 @@ static void GPENCIL_create_framebuffers(void *vedata) size[0], size[1], fb_format, &draw_engine_gpencil_type); GPU_framebuffer_ensure_config( - &fbl->temp_fb_a, { - GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_a), - GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_a) - }); + &fbl->temp_fb_a, { + GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_a), + GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_a), + }); e_data.temp_depth_tx_b = DRW_texture_pool_query_2D( size[0], size[1], GPU_DEPTH_COMPONENT24, @@ -137,10 +137,10 @@ static void GPENCIL_create_framebuffers(void *vedata) size[0], size[1], fb_format, &draw_engine_gpencil_type); GPU_framebuffer_ensure_config( - &fbl->temp_fb_b, { - GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_b), - GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_b) - }); + &fbl->temp_fb_b, { + GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_b), + GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_b), + }); /* used for FX effects and Layer blending */ e_data.temp_depth_tx_fx = DRW_texture_pool_query_2D( @@ -150,10 +150,10 @@ static void GPENCIL_create_framebuffers(void *vedata) size[0], size[1], fb_format, &draw_engine_gpencil_type); GPU_framebuffer_ensure_config( - &fbl->temp_fb_fx, { - GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_fx), - GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_fx), - }); + &fbl->temp_fb_fx, { + GPU_ATTACHMENT_TEXTURE(e_data.temp_depth_tx_fx), + GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_fx), + }); } /* background framebuffer to speed up drawing process (always 16 bits) */ @@ -165,10 +165,10 @@ static void GPENCIL_create_framebuffers(void *vedata) size[0], size[1], GPU_RGBA32F, &draw_engine_gpencil_type); GPU_framebuffer_ensure_config( - &fbl->background_fb, { - GPU_ATTACHMENT_TEXTURE(e_data.background_depth_tx), - GPU_ATTACHMENT_TEXTURE(e_data.background_color_tx) - }); + &fbl->background_fb, { + GPU_ATTACHMENT_TEXTURE(e_data.background_depth_tx), + GPU_ATTACHMENT_TEXTURE(e_data.background_color_tx), + }); } } } @@ -345,8 +345,8 @@ void GPENCIL_cache_init(void *vedata) stl->storage->shgroup_id = 0; /* Stroke pass 3D */ psl->stroke_pass_3d = DRW_pass_create( - "GPencil Stroke Pass", - DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND); + "GPencil Stroke Pass", + DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND); stl->storage->shgroup_id = 0; /* edit pass */ @@ -518,8 +518,8 @@ void GPENCIL_cache_init(void *vedata) /* blend layers pass */ psl->blend_pass = DRW_pass_create( - "GPencil Blend Layers Pass", - DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS); + "GPencil Blend Layers Pass", + DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS); DRWShadingGroup *blend_shgrp = DRW_shgroup_create(e_data.gpencil_blend_fullscreen_sh, psl->blend_pass); DRW_shgroup_call_add(blend_shgrp, quad, NULL); DRW_shgroup_uniform_texture_ref(blend_shgrp, "strokeColor", &e_data.temp_color_tx_a); @@ -601,8 +601,8 @@ void GPENCIL_cache_populate(void *vedata, Object *ob) if (ob->dt != OB_BOUNDBOX) { /* save gp objects for drawing later */ stl->g_data->gp_object_cache = gpencil_object_cache_add( - stl->g_data->gp_object_cache, ob, - &stl->g_data->gp_cache_size, &stl->g_data->gp_cache_used); + stl->g_data->gp_object_cache, ob, + &stl->g_data->gp_cache_size, &stl->g_data->gp_cache_used); /* enable instance loop */ if (!stl->g_data->do_instances) { @@ -759,8 +759,8 @@ static void gpencil_draw_pass_range( } DRW_draw_pass_subset( - GPENCIL_3D_DRAWMODE(ob, gpd) ? psl->stroke_pass_3d : psl->stroke_pass_2d, - init_shgrp, end_shgrp); + GPENCIL_3D_DRAWMODE(ob, gpd) ? psl->stroke_pass_3d : psl->stroke_pass_2d, + init_shgrp, end_shgrp); if ((!stl->storage->is_mat_preview) && (multi)) { MULTISAMPLE_GP_SYNC_DISABLE(stl->storage->multisamples, fbl, fb, txl); @@ -781,7 +781,7 @@ static void drw_gpencil_select_render(GPENCIL_StorageList *stl, GPENCIL_PassList { /* sort by zdepth */ qsort(stl->g_data->gp_object_cache, stl->g_data->gp_cache_used, - sizeof(tGPencilObjectCache), gpencil_object_cache_compare_zdepth); + sizeof(tGPencilObjectCache), gpencil_object_cache_compare_zdepth); for (int i = 0; i < stl->g_data->gp_cache_used; i++) { cache_ob = &stl->g_data->gp_object_cache[i]; @@ -799,8 +799,8 @@ static void drw_gpencil_select_render(GPENCIL_StorageList *stl, GPENCIL_PassList } /* draw group */ DRW_draw_pass_subset( - GPENCIL_3D_DRAWMODE(ob, gpd) ? psl->stroke_pass_3d : psl->stroke_pass_2d, - init_shgrp, end_shgrp); + GPENCIL_3D_DRAWMODE(ob, gpd) ? psl->stroke_pass_3d : psl->stroke_pass_2d, + init_shgrp, end_shgrp); } /* the cache must be dirty for next loop */ gpd->flag |= GP_DATA_CACHE_IS_DIRTY; @@ -918,8 +918,8 @@ void GPENCIL_draw_scene(void *ved) use_blend = true; /* draw pending groups */ gpencil_draw_pass_range( - fbl, stl, psl, txl, fbl->temp_fb_a, - ob, gpd, init_shgrp, end_shgrp, is_last); + fbl, stl, psl, txl, fbl->temp_fb_a, + ob, gpd, init_shgrp, end_shgrp, is_last); /* draw current group in separated texture */ init_shgrp = array_elm->init_shgrp; diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c index 2e3cb4b7b26..d754fdfea3e 100644 --- a/source/blender/draw/engines/gpencil/gpencil_render.c +++ b/source/blender/draw/engines/gpencil/gpencil_render.c @@ -81,16 +81,16 @@ void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgra } vedata->render_depth_tx = DRW_texture_pool_query_2D( - size[0], size[1], GPU_DEPTH_COMPONENT24, - &draw_engine_gpencil_type); + size[0], size[1], GPU_DEPTH_COMPONENT24, + &draw_engine_gpencil_type); vedata->render_color_tx = DRW_texture_pool_query_2D( - size[0], size[1], GPU_RGBA32F, - &draw_engine_gpencil_type); + size[0], size[1], GPU_RGBA32F, + &draw_engine_gpencil_type); GPU_framebuffer_ensure_config( - &fbl->main, { - GPU_ATTACHMENT_TEXTURE(vedata->render_depth_tx), - GPU_ATTACHMENT_TEXTURE(vedata->render_color_tx) - }); + &fbl->main, { + GPU_ATTACHMENT_TEXTURE(vedata->render_depth_tx), + GPU_ATTACHMENT_TEXTURE(vedata->render_color_tx) + }); /* Alloc transient data. */ if (!stl->g_data) { diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c index e4819f48eb1..b1bc796bfa7 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c +++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c @@ -457,8 +457,8 @@ static void DRW_gpencil_fx_shadow( GPUBatch *fxquad = DRW_cache_fullscreen_quad_get(); /* prepare pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_shadow_prepare_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_shadow_prepare_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a); @@ -494,8 +494,8 @@ static void DRW_gpencil_fx_shadow( /* blur pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_blur_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_blur_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_fx); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_fx); @@ -510,8 +510,8 @@ static void DRW_gpencil_fx_shadow( /* resolve pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_shadow_resolve_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_shadow_resolve_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a); @@ -540,8 +540,8 @@ static void DRW_gpencil_fx_glow( GPUBatch *fxquad = DRW_cache_fullscreen_quad_get(); /* prepare pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_glow_prepare_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_glow_prepare_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a); @@ -555,8 +555,8 @@ static void DRW_gpencil_fx_glow( /* blur pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_blur_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_blur_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_fx); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_fx); @@ -571,8 +571,8 @@ static void DRW_gpencil_fx_glow( /* resolve pass */ fx_shgrp = DRW_shgroup_create( - e_data->gpencil_fx_glow_resolve_sh, - psl->fx_shader_pass_blend); + e_data->gpencil_fx_glow_resolve_sh, + psl->fx_shader_pass_blend); DRW_shgroup_call_add(fx_shgrp, fxquad, NULL); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a); DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a); @@ -659,52 +659,52 @@ void GPENCIL_create_fx_shaders(GPENCIL_e_data *e_data) /* fx shaders (all in screen space) */ if (!e_data->gpencil_fx_blur_sh) { e_data->gpencil_fx_blur_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_blur_frag_glsl, NULL); + datatoc_gpencil_fx_blur_frag_glsl, NULL); } if (!e_data->gpencil_fx_colorize_sh) { e_data->gpencil_fx_colorize_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_colorize_frag_glsl, NULL); + datatoc_gpencil_fx_colorize_frag_glsl, NULL); } if (!e_data->gpencil_fx_flip_sh) { e_data->gpencil_fx_flip_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_flip_frag_glsl, NULL); + datatoc_gpencil_fx_flip_frag_glsl, NULL); } if (!e_data->gpencil_fx_light_sh) { e_data->gpencil_fx_light_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_light_frag_glsl, NULL); + datatoc_gpencil_fx_light_frag_glsl, NULL); } if (!e_data->gpencil_fx_pixel_sh) { e_data->gpencil_fx_pixel_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_pixel_frag_glsl, NULL); + datatoc_gpencil_fx_pixel_frag_glsl, NULL); } if (!e_data->gpencil_fx_rim_prepare_sh) { e_data->gpencil_fx_rim_prepare_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_rim_prepare_frag_glsl, NULL); + datatoc_gpencil_fx_rim_prepare_frag_glsl, NULL); e_data->gpencil_fx_rim_resolve_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_rim_resolve_frag_glsl, NULL); + datatoc_gpencil_fx_rim_resolve_frag_glsl, NULL); } if (!e_data->gpencil_fx_shadow_prepare_sh) { e_data->gpencil_fx_shadow_prepare_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_shadow_prepare_frag_glsl, NULL); + datatoc_gpencil_fx_shadow_prepare_frag_glsl, NULL); e_data->gpencil_fx_shadow_resolve_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_shadow_resolve_frag_glsl, NULL); + datatoc_gpencil_fx_shadow_resolve_frag_glsl, NULL); } if (!e_data->gpencil_fx_glow_prepare_sh) { e_data->gpencil_fx_glow_prepare_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_glow_prepare_frag_glsl, NULL); + datatoc_gpencil_fx_glow_prepare_frag_glsl, NULL); e_data->gpencil_fx_glow_resolve_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_glow_resolve_frag_glsl, NULL); + datatoc_gpencil_fx_glow_resolve_frag_glsl, NULL); } if (!e_data->gpencil_fx_swirl_sh) { e_data->gpencil_fx_swirl_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_swirl_frag_glsl, NULL); + datatoc_gpencil_fx_swirl_frag_glsl, NULL); } if (!e_data->gpencil_fx_wave_sh) { e_data->gpencil_fx_wave_sh = DRW_shader_create_fullscreen( - datatoc_gpencil_fx_wave_frag_glsl, NULL); + datatoc_gpencil_fx_wave_frag_glsl, NULL); } } @@ -880,8 +880,9 @@ static void draw_gpencil_midpass_blur( GPU_framebuffer_bind(fbl->temp_fb_b); GPU_framebuffer_clear_color_depth(fbl->temp_fb_b, clearcol, 1.0f); - DRW_draw_pass_subset(psl->fx_shader_pass_blend, - runtime->fx_sh_b, runtime->fx_sh_b); + DRW_draw_pass_subset( + psl->fx_shader_pass_blend, + runtime->fx_sh_b, runtime->fx_sh_b); /* copy pass from b for ping-pong frame buffers */ GPU_framebuffer_bind(fbl->temp_fb_fx); @@ -981,8 +982,8 @@ static void draw_gpencil_shadow_passes( GPU_framebuffer_bind(fbl->temp_fb_fx); GPU_framebuffer_clear_color_depth(fbl->temp_fb_fx, clearcol, 1.0f); DRW_draw_pass_subset( - psl->fx_shader_pass_blend, - fxd->runtime.fx_sh, fxd->runtime.fx_sh); + psl->fx_shader_pass_blend, + fxd->runtime.fx_sh, fxd->runtime.fx_sh); /* blur shadow */ draw_gpencil_do_blur( @@ -995,8 +996,8 @@ static void draw_gpencil_shadow_passes( GPU_framebuffer_bind(fbl->temp_fb_b); GPU_framebuffer_clear_color_depth(fbl->temp_fb_b, clearcol, 1.0f); DRW_draw_pass_subset( - psl->fx_shader_pass_blend, - fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c); + psl->fx_shader_pass_blend, + fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c); /* copy pass from b to a for ping-pong frame buffers */ e_data->input_depth_tx = e_data->temp_depth_tx_b; @@ -1026,8 +1027,8 @@ static void draw_gpencil_glow_passes( GPU_framebuffer_bind(fbl->temp_fb_fx); GPU_framebuffer_clear_color_depth(fbl->temp_fb_fx, clearcol, 1.0f); DRW_draw_pass_subset( - psl->fx_shader_pass_blend, - fxd->runtime.fx_sh, fxd->runtime.fx_sh); + psl->fx_shader_pass_blend, + fxd->runtime.fx_sh, fxd->runtime.fx_sh); /* blur glow */ draw_gpencil_do_blur( @@ -1044,8 +1045,8 @@ static void draw_gpencil_glow_passes( fxd->blur[1] = (fxd->flag & FX_GLOW_USE_ALPHA) ? 1 : 0; DRW_draw_pass_subset( - psl->fx_shader_pass_blend, - fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c); + psl->fx_shader_pass_blend, + fxd->runtime.fx_sh_c, fxd->runtime.fx_sh_c); /* copy pass from b to a for ping-pong frame buffers */ e_data->input_depth_tx = e_data->temp_depth_tx_b; |