Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_effects.c
| Show First 20 Lines • Show All 459 Lines • ▼ Show 20 Lines | #endif | ||||
| { | { | ||||
| /* Fix dot corruption on intel HD5XX/HD6XX series. */ | /* Fix dot corruption on intel HD5XX/HD6XX series. */ | ||||
| GPU_flush(); | GPU_flush(); | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Simple downsampling algorithm. Reconstruct mip chain up to mip level. | * Simple downsampling algorithm. Reconstruct mip chain up to mip level. | ||||
| **/ | */ | ||||
| void EEVEE_downsample_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level) | void EEVEE_downsample_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level) | ||||
| { | { | ||||
| EEVEE_FramebufferList *fbl = vedata->fbl; | EEVEE_FramebufferList *fbl = vedata->fbl; | ||||
| e_data.color_src = texture_src; | e_data.color_src = texture_src; | ||||
| /* Create lower levels */ | /* Create lower levels */ | ||||
| DRW_stats_group_start("Downsample buffer"); | DRW_stats_group_start("Downsample buffer"); | ||||
| GPU_framebuffer_texture_attach(fbl->downsample_fb, texture_src, 0, 0); | GPU_framebuffer_texture_attach(fbl->downsample_fb, texture_src, 0, 0); | ||||
| GPU_framebuffer_recursive_downsample(fbl->downsample_fb, level, &simple_downsample_cb, vedata); | GPU_framebuffer_recursive_downsample(fbl->downsample_fb, level, &simple_downsample_cb, vedata); | ||||
| GPU_framebuffer_texture_detach(fbl->downsample_fb, texture_src); | GPU_framebuffer_texture_detach(fbl->downsample_fb, texture_src); | ||||
| DRW_stats_group_end(); | DRW_stats_group_end(); | ||||
| } | } | ||||
| /** | /** | ||||
| * Simple downsampling algorithm for cubemap. Reconstruct mip chain up to mip level. | * Simple downsampling algorithm for cubemap. Reconstruct mip chain up to mip level. | ||||
| **/ | */ | ||||
| void EEVEE_downsample_cube_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level) | void EEVEE_downsample_cube_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level) | ||||
| { | { | ||||
| EEVEE_FramebufferList *fbl = vedata->fbl; | EEVEE_FramebufferList *fbl = vedata->fbl; | ||||
| e_data.color_src = texture_src; | e_data.color_src = texture_src; | ||||
| /* Create lower levels */ | /* Create lower levels */ | ||||
| DRW_stats_group_start("Downsample Cube buffer"); | DRW_stats_group_start("Downsample Cube buffer"); | ||||
| GPU_framebuffer_texture_attach(fbl->downsample_fb, texture_src, 0, 0); | GPU_framebuffer_texture_attach(fbl->downsample_fb, texture_src, 0, 0); | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||