Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_fade.cc
| Show All 30 Lines | for (int i = 0; i < 2; i++) { | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| float color[4]; | float color[4]; | ||||
| ED_view3d_background_color_get(draw_ctx->scene, draw_ctx->v3d, color); | ED_view3d_background_color_get(draw_ctx->scene, draw_ctx->v3d, color); | ||||
| color[3] = pd->overlay.fade_alpha; | color[3] = pd->overlay.fade_alpha; | ||||
| if (draw_ctx->v3d->shading.background_type == V3D_SHADING_BACKGROUND_THEME) { | if (draw_ctx->v3d->shading.background_type == V3D_SHADING_BACKGROUND_THEME) { | ||||
| srgb_to_linearrgb_v4(color, color); | srgb_to_linearrgb_v4(color, color); | ||||
| } | } | ||||
| DRW_shgroup_uniform_vec4_copy(pd->fade_grp[i], "color", color); | DRW_shgroup_uniform_vec4_copy(pd->fade_grp[i], "ucolor", color); | ||||
| } | } | ||||
| if (!pd->use_in_front) { | if (!pd->use_in_front) { | ||||
| pd->fade_grp[IN_FRONT] = pd->fade_grp[NOT_IN_FRONT]; | pd->fade_grp[IN_FRONT] = pd->fade_grp[NOT_IN_FRONT]; | ||||
| } | } | ||||
| } | } | ||||
| void OVERLAY_fade_cache_populate(OVERLAY_Data *vedata, Object *ob) | void OVERLAY_fade_cache_populate(OVERLAY_Data *vedata, Object *ob) | ||||
| Show All 36 Lines | |||||