diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-08-10 00:51:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-08-10 16:43:48 +0300 |
commit | 2ba11d72a2cfcdb7639de1e8a20a6ec587d38a1f (patch) | |
tree | bb0e627affe5e3df4fc68693df12757a8e859882 /source/blender/draw/modes/object_mode.c | |
parent | 7641f92710a09ea089748896bbad0bf5383ba349 (diff) |
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).
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |