Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/workbench/workbench_data.c
| Show First 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | static void workbench_studiolight_data_update(WORKBENCH_PrivateData *wpd, WORKBENCH_UBO_World *wd) | ||||
| } | } | ||||
| else { | else { | ||||
| copy_v3_fl(wd->ambient_color, 1.0f); | copy_v3_fl(wd->ambient_color, 1.0f); | ||||
| } | } | ||||
| wd->use_specular = workbench_is_specular_highlight_enabled(wpd); | wd->use_specular = workbench_is_specular_highlight_enabled(wpd); | ||||
| } | } | ||||
| void workbench_private_data_alloc(WORKBENCH_StorageList *stl) | |||||
| { | |||||
| if (!stl->wpd) { | |||||
| stl->wpd = MEM_callocN(sizeof(*stl->wpd), __func__); | |||||
| stl->wpd->taa_sample_len_previous = -1; | |||||
| stl->wpd->view_updated = true; | |||||
| } | |||||
| } | |||||
| void workbench_private_data_init(WORKBENCH_PrivateData *wpd) | void workbench_private_data_init(WORKBENCH_PrivateData *wpd) | ||||
| { | { | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | const DRWContextState *draw_ctx = DRW_context_state_get(); | ||||
| RegionView3D *rv3d = draw_ctx->rv3d; | RegionView3D *rv3d = draw_ctx->rv3d; | ||||
| View3D *v3d = draw_ctx->v3d; | View3D *v3d = draw_ctx->v3d; | ||||
| Scene *scene = draw_ctx->scene; | Scene *scene = draw_ctx->scene; | ||||
| WORKBENCH_ViewLayerData *vldata = workbench_view_layer_data_ensure_ex(draw_ctx->view_layer); | WORKBENCH_ViewLayerData *vldata = workbench_view_layer_data_ensure_ex(draw_ctx->view_layer); | ||||
| ▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines | |||||