diff options
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_engine.c | 3 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_outline.c | 6 | ||||
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_wireframe.c | 10 |
3 files changed, 4 insertions, 15 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_engine.c b/source/blender/draw/engines/overlay/overlay_engine.c index cfa0fa9eb1a..740ca42800e 100644 --- a/source/blender/draw/engines/overlay/overlay_engine.c +++ b/source/blender/draw/engines/overlay/overlay_engine.c @@ -382,9 +382,6 @@ static void OVERLAY_cache_finish(void *vedata) DRW_texture_ensure_fullscreen_2d(&dtxl->depth_in_front, GPU_DEPTH24_STENCIL8, 0); GPU_framebuffer_ensure_config( - &dfbl->default_fb, - {GPU_ATTACHMENT_TEXTURE(dtxl->depth), GPU_ATTACHMENT_TEXTURE(dtxl->color)}); - GPU_framebuffer_ensure_config( &dfbl->in_front_fb, {GPU_ATTACHMENT_TEXTURE(dtxl->depth_in_front), GPU_ATTACHMENT_TEXTURE(dtxl->color)}); } diff --git a/source/blender/draw/engines/overlay/overlay_outline.c b/source/blender/draw/engines/overlay/overlay_outline.c index e77a0a143a9..0395f6890bd 100644 --- a/source/blender/draw/engines/overlay/overlay_outline.c +++ b/source/blender/draw/engines/overlay/overlay_outline.c @@ -33,7 +33,7 @@ #include "overlay_private.h" -/* Returns the normal plane in ndc space. */ +/* Returns the normal plane in NDC space. */ static void gpencil_depth_plane(Object *ob, float r_plane[4]) { /* TODO put that into private data. */ @@ -42,11 +42,11 @@ static void gpencil_depth_plane(Object *ob, float r_plane[4]) float *camera_z_axis = viewinv[2]; float *camera_pos = viewinv[3]; - /* Find the normal most likely to represent the gpObject. */ + /* Find the normal most likely to represent the grease pencil object. */ /* TODO: This does not work quite well if you use * strokes not aligned with the object axes. Maybe we could try to * compute the minimum axis of all strokes. But this would be more - * computationaly heavy and should go into the GPData evaluation. */ + * computationally heavy and should go into the GPData evaluation. */ BoundBox *bbox = BKE_object_boundbox_get(ob); /* Convert bbox to matrix */ float mat[4][4], size[3], center[3]; diff --git a/source/blender/draw/engines/overlay/overlay_wireframe.c b/source/blender/draw/engines/overlay/overlay_wireframe.c index 722055c36f0..6b0e5e0b72e 100644 --- a/source/blender/draw/engines/overlay/overlay_wireframe.c +++ b/source/blender/draw/engines/overlay/overlay_wireframe.c @@ -68,22 +68,17 @@ void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata) OVERLAY_shader_wireframe(); for (int xray = 0; xray < (is_material_shmode ? 1 : 2); xray++) { - /* Only do stencil test if stencil buffer is written by the render engine. */ - DRWState stencil_state = is_material_shmode ? 0 : DRW_STATE_STENCIL_EQUAL; DRWState state = DRW_STATE_FIRST_VERTEX_CONVENTION | DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL; DRWPass *pass; - uint stencil_mask; if (xray == 0) { - DRW_PASS_CREATE(psl->wireframe_ps, state | stencil_state | pd->clipping_state); + DRW_PASS_CREATE(psl->wireframe_ps, state | pd->clipping_state); pass = psl->wireframe_ps; - stencil_mask = 0xFF; } else { DRW_PASS_CREATE(psl->wireframe_xray_ps, state | pd->clipping_state); pass = psl->wireframe_xray_ps; - stencil_mask = 0x00; } for (int use_coloring = 0; use_coloring < 2; use_coloring++) { @@ -94,17 +89,14 @@ void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata) DRW_shgroup_uniform_bool_copy(grp, "isTransform", (G.moving & G_TRANSFORM_OBJ) != 0); DRW_shgroup_uniform_bool_copy(grp, "isObjectColor", is_object_color); DRW_shgroup_uniform_bool_copy(grp, "isRandomColor", is_random_color); - DRW_shgroup_stencil_mask(grp, stencil_mask); pd->wires_all_grp[xray][use_coloring] = grp = DRW_shgroup_create(wires_sh, pass); DRW_shgroup_uniform_float_copy(grp, "wireStepParam", 1.0f); - DRW_shgroup_stencil_mask(grp, stencil_mask); } pd->wires_sculpt_grp[xray] = grp = DRW_shgroup_create(wires_sh, pass); DRW_shgroup_uniform_float_copy(grp, "wireStepParam", 10.0f); DRW_shgroup_uniform_bool_copy(grp, "useColoring", false); - DRW_shgroup_stencil_mask(grp, stencil_mask); } if (is_material_shmode) { |