Overlay Engine: Add back selectability of planar lightprobe data plane

This commit is contained in:
Clément Foucault 2019-12-04 22:32:08 +01:00
parent 4705aa4fe5
commit 4949a62d4d
2 changed files with 7 additions and 0 deletions

View File

@ -143,6 +143,7 @@ void OVERLAY_extra_cache_init(OVERLAY_Data *vedata)
cb->probe_cube = BUF_INSTANCE(grp_sub, format, DRW_cache_lightprobe_planar_get());
cb->probe_grid = BUF_INSTANCE(grp_sub, format, DRW_cache_lightprobe_grid_get());
cb->probe_planar = BUF_INSTANCE(grp_sub, format, DRW_cache_lightprobe_planar_get());
cb->solid_quad = BUF_INSTANCE(grp_sub, format, DRW_cache_quad_get());
cb->speaker = BUF_INSTANCE(grp_sub, format, DRW_cache_speaker_get());
grp_sub = DRW_shgroup_create_sub(grp);
@ -759,6 +760,10 @@ void OVERLAY_lightprobe_cache_populate(OVERLAY_Data *vedata, Object *ob)
case LIGHTPROBE_TYPE_PLANAR:
DRW_buffer_add_entry(cb->probe_planar, color_p, &instdata);
if (DRW_state_is_select() && (prb->flag & LIGHTPROBE_FLAG_SHOW_DATA)) {
DRW_buffer_add_entry(cb->solid_quad, color_p, &instdata);
}
if (show_influence) {
normalize_v3_length(instdata.mat[2], prb->distinf);
DRW_buffer_add_entry(cb->empty_cube, color_p, &instdata);

View File

@ -166,6 +166,8 @@ typedef struct OVERLAY_ExtraCallBuffers {
DRWCallBuffer *probe_cube;
DRWCallBuffer *probe_grid;
DRWCallBuffer *solid_quad;
DRWCallBuffer *speaker;
DRWShadingGroup *extra_wire;