Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_effects.c
| Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, | ||||
| const bool minimal) | const bool minimal) | ||||
| { | { | ||||
| EEVEE_CommonUniformBuffer *common_data = &sldata->common_data; | EEVEE_CommonUniformBuffer *common_data = &sldata->common_data; | ||||
| EEVEE_StorageList *stl = vedata->stl; | EEVEE_StorageList *stl = vedata->stl; | ||||
| EEVEE_FramebufferList *fbl = vedata->fbl; | EEVEE_FramebufferList *fbl = vedata->fbl; | ||||
| EEVEE_TextureList *txl = vedata->txl; | EEVEE_TextureList *txl = vedata->txl; | ||||
| EEVEE_EffectsInfo *effects; | EEVEE_EffectsInfo *effects; | ||||
| DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | ||||
| const DRWContextState *draw_ctx = DRW_context_state_get(); | |||||
| ViewLayer *view_layer = draw_ctx->view_layer; | |||||
| const float *viewport_size = DRW_viewport_size_get(); | const float *viewport_size = DRW_viewport_size_get(); | ||||
| int size_fs[2] = {(int)viewport_size[0], (int)viewport_size[1]}; | int size_fs[2] = {(int)viewport_size[0], (int)viewport_size[1]}; | ||||
| /* Shaders */ | /* Shaders */ | ||||
| if (!e_data.downsample_sh) { | if (!e_data.downsample_sh) { | ||||
| eevee_create_shader_downsample(); | eevee_create_shader_downsample(); | ||||
| } | } | ||||
| Show All 18 Lines | if ((effects->enabled_effects & EFFECT_TAA) && effects->taa_current_sample > 1) { | ||||
| * taa_current_sample. (See T66811) */ | * taa_current_sample. (See T66811) */ | ||||
| EEVEE_temporal_sampling_update_matrices(vedata); | EEVEE_temporal_sampling_update_matrices(vedata); | ||||
| } | } | ||||
| EEVEE_volumes_init(sldata, vedata); | EEVEE_volumes_init(sldata, vedata); | ||||
| EEVEE_subsurface_init(sldata, vedata); | EEVEE_subsurface_init(sldata, vedata); | ||||
| /* Force normal buffer creation. */ | /* Force normal buffer creation. */ | ||||
| if (DRW_state_is_image_render() && !minimal && (view_layer->passflag & SCE_PASS_NORMAL) != 0) { | if (!minimal && (stl->g_data->render_passes & SCE_PASS_NORMAL) != 0) { | ||||
| effects->enabled_effects |= EFFECT_NORMAL_BUFFER; | effects->enabled_effects |= EFFECT_NORMAL_BUFFER; | ||||
| } | } | ||||
| /* Alpha checker if background is not drawn in viewport. */ | /* Alpha checker if background is not drawn in viewport. */ | ||||
| if (!DRW_state_is_image_render() && !DRW_state_draw_background()) { | if (!DRW_state_is_image_render() && !DRW_state_draw_background()) { | ||||
| effects->enabled_effects |= EFFECT_ALPHA_CHECKER; | effects->enabled_effects |= EFFECT_ALPHA_CHECKER; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 451 Lines • Show Last 20 Lines | |||||