Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-12-04 03:31:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-12-05 00:32:17 +0300
commit6d3eb85f66ae93d9d4859ef3264f1a1b2ae4fa36 (patch)
treea18be546ae0daee539de83bcddea7ee4e2195e24 /source/blender/draw/engines/overlay/overlay_private.h
parente203f69bc3eb0c3c77820d54821c2e71469f36d1 (diff)
Overlay Engine: Simplify outline rendering by using the antialiasing pass
This use the overlay AA pass to antialias the selection outlines. This also do all search and expand in one pass and reduce the computation time and memory used (2 x 32bit/pixel buffer less). Note that the aliasing is a bit worse than the old FXAA that we used to have.
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_private.h')
-rw-r--r--source/blender/draw/engines/overlay/overlay_private.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_private.h b/source/blender/draw/engines/overlay/overlay_private.h
index 6b030b65ac0..5b25a473528 100644
--- a/source/blender/draw/engines/overlay/overlay_private.h
+++ b/source/blender/draw/engines/overlay/overlay_private.h
@@ -35,16 +35,14 @@ typedef struct OVERLAY_FramebufferList {
struct GPUFrameBuffer *overlay_color_only_fb;
struct GPUFrameBuffer *overlay_in_front_fb;
struct GPUFrameBuffer *outlines_prepass_fb;
- struct GPUFrameBuffer *outlines_process_fb[2];
+ struct GPUFrameBuffer *outlines_resolve_fb;
} OVERLAY_FramebufferList;
typedef struct OVERLAY_TextureList {
struct GPUTexture *temp_depth_tx;
struct GPUTexture *dummy_depth_tx;
struct GPUTexture *outlines_id_tx;
- struct GPUTexture *outlines_color_tx[2];
struct GPUTexture *overlay_color_tx;
- struct GPUTexture *overlay_color_history_tx;
struct GPUTexture *overlay_line_tx;
struct GPUTexture *edit_mesh_occlude_wire_tx;
} OVERLAY_TextureList;
@@ -87,8 +85,6 @@ typedef struct OVERLAY_PassList {
DRWPass *motion_paths_ps;
DRWPass *outlines_prepass_ps;
DRWPass *outlines_detect_ps;
- DRWPass *outlines_expand_ps;
- DRWPass *outlines_bleed_ps;
DRWPass *outlines_resolve_ps;
DRWPass *paint_color_ps;
DRWPass *paint_overlay_ps;
@@ -278,9 +274,6 @@ typedef struct OVERLAY_PrivateData {
OVERLAY_ShadingData shdata;
struct {
- short sample;
- short target_sample;
- float prev_persmat[4][4];
bool enabled;
} antialiasing;
struct {
@@ -388,7 +381,6 @@ BLI_INLINE void pack_fl_in_mat4(float rmat[4][4], const float mat[4][4], float a
rmat[3][3] = a;
}
-void OVERLAY_antialiasing_reset(OVERLAY_Data *vedata);
void OVERLAY_antialiasing_init(OVERLAY_Data *vedata);
void OVERLAY_antialiasing_cache_init(OVERLAY_Data *vedata);
void OVERLAY_antialiasing_cache_finish(OVERLAY_Data *vedata);
@@ -562,9 +554,7 @@ GPUShader *OVERLAY_shader_motion_path_vert(void);
GPUShader *OVERLAY_shader_uniform_color(void);
GPUShader *OVERLAY_shader_outline_prepass(bool use_wire);
GPUShader *OVERLAY_shader_outline_prepass_grid(void);
-GPUShader *OVERLAY_shader_outline_resolve(void);
-GPUShader *OVERLAY_shader_outline_expand(bool high_dpi);
-GPUShader *OVERLAY_shader_outline_detect(bool use_wire);
+GPUShader *OVERLAY_shader_outline_detect(void);
GPUShader *OVERLAY_shader_paint_face(void);
GPUShader *OVERLAY_shader_paint_point(void);
GPUShader *OVERLAY_shader_paint_texture(void);