DRW: Refactor simple instancing.
authorClément Foucault <foucault.clem@gmail.com>
Thu, 1 Mar 2018 18:27:38 +0000 (19:27 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Fri, 2 Mar 2018 17:35:59 +0000 (18:35 +0100)
commitd63829117c21c0d926cf0a9df645c3ed5cd8057a
tree5497f58c4b52cd894f4811fb35da3727fb059d8f
parent62390527b2e9b6a6a2939df120f87b5b2a54e74b
DRW: Refactor simple instancing.

Instead of creating a new instancing shading group without attrib, we now have instancing calls. The benefits is that they can be culled.
They can be used in conjuction with the standard and generate calls but shader must support it (which is generally not the case).
We store a pointer to the actual count so that the number can be tweaked between redraw.

This will makes multi layer rendering more efficient.
14 files changed:
intern/gawain/gawain/gwn_batch.h
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/engines/eevee/eevee_lights.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/eevee/eevee_private.h
source/blender/draw/engines/eevee/eevee_render.c
source/blender/draw/engines/eevee/shaders/shadow_vert.glsl
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_manager.h
source/blender/draw/intern/draw_manager_data.c
source/blender/draw/intern/draw_manager_exec.c
source/blender/draw/modes/object_mode.c