From 2ba11d72a2cfcdb7639de1e8a20a6ec587d38a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 9 Aug 2017 23:51:00 +0200 Subject: Object Mode Engine: Optimize outline passes. Group texture fetches to hide latency. 3.2ms -> 2.2ms (constant time improvement, not depending on scene complexity) Could optimize further with textureGather (require OpenGL 4.0). --- source/blender/draw/modes/object_mode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/modes/object_mode.c') diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 8176fbcda5c..1e70e942d07 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -696,7 +696,7 @@ static void OBJECT_cache_init(void *vedata) { DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_WIRE; - psl->outlines = DRW_pass_create("Outlines Pass", state); + psl->outlines = DRW_pass_create("Outlines Depth Pass", state); GPUShader *sh = GPU_shader_get_builtin_shader(GPU_SHADER_3D_UNIFORM_COLOR); @@ -725,7 +725,7 @@ static void OBJECT_cache_init(void *vedata) static bool bTrue = true; static bool bFalse = false; - psl->outlines_search = DRW_pass_create("Outlines Expand Pass", state); + psl->outlines_search = DRW_pass_create("Outlines Detect Pass", state); DRWShadingGroup *grp = DRW_shgroup_create(e_data.outline_detect_sh, psl->outlines_search); DRW_shgroup_uniform_buffer(grp, "outlineColor", &e_data.outlines_color_tx); -- cgit v1.2.3