Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_effects.c
| Show First 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | void EEVEE_downsample_cube_buffer(EEVEE_Data *vedata, struct GPUFrameBuffer *fb_src, GPUTexture *texture_src, int level) | ||||
| e_data.color_src = texture_src; | e_data.color_src = texture_src; | ||||
| DRW_stats_group_start("Downsample Cube buffer"); | DRW_stats_group_start("Downsample Cube buffer"); | ||||
| /* Create lower levels */ | /* Create lower levels */ | ||||
| DRW_framebuffer_recursive_downsample(fb_src, texture_src, level, &simple_downsample_cube_cb, vedata); | DRW_framebuffer_recursive_downsample(fb_src, texture_src, level, &simple_downsample_cube_cb, vedata); | ||||
| DRW_stats_group_end(); | DRW_stats_group_end(); | ||||
| } | } | ||||
| void EEVEE_draw_effects(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) | void EEVEE_draw_effects(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata) | ||||
| { | { | ||||
| EEVEE_TextureList *txl = vedata->txl; | EEVEE_TextureList *txl = vedata->txl; | ||||
| EEVEE_FramebufferList *fbl = vedata->fbl; | EEVEE_FramebufferList *fbl = vedata->fbl; | ||||
| EEVEE_StorageList *stl = vedata->stl; | EEVEE_StorageList *stl = vedata->stl; | ||||
| EEVEE_EffectsInfo *effects = stl->effects; | EEVEE_EffectsInfo *effects = stl->effects; | ||||
| DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | DefaultTextureList *dtxl = DRW_viewport_texture_list_get(); | ||||
| /* only once per frame after the first post process */ | /* only once per frame after the first post process */ | ||||
| Show All 26 Lines | if (!stl->g_data->valid_double_buffer && | ||||
| (DRW_state_is_image_render() == false)) | (DRW_state_is_image_render() == false)) | ||||
| { | { | ||||
| /* If history buffer is not valid request another frame. | /* If history buffer is not valid request another frame. | ||||
| * This fix black reflections on area resize. */ | * This fix black reflections on area resize. */ | ||||
| DRW_viewport_request_redraw(); | DRW_viewport_request_redraw(); | ||||
| } | } | ||||
| /* Record pers matrix for the next frame. */ | /* Record pers matrix for the next frame. */ | ||||
| DRW_viewport_matrix_get(sldata->common_data.prev_persmat, DRW_MAT_PERS); | DRW_viewport_matrix_get(stl->effects->prev_persmat, DRW_MAT_PERS); | ||||
| /* Update double buffer status if render mode. */ | /* Update double buffer status if render mode. */ | ||||
| if (DRW_state_is_image_render()) { | if (DRW_state_is_image_render()) { | ||||
| stl->g_data->valid_double_buffer = (txl->color_double_buffer != NULL); | stl->g_data->valid_double_buffer = (txl->color_double_buffer != NULL); | ||||
| } | } | ||||
| } | } | ||||
| void EEVEE_effects_free(void) | void EEVEE_effects_free(void) | ||||
| Show All 13 Lines | |||||