Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_volumes.c
| Show First 20 Lines • Show All 769 Lines • ▼ Show 20 Lines | void EEVEE_volumes_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) | ||||
| 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; | ||||
| if ((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) { | if ((effects->enabled_effects & EFFECT_VOLUMETRIC) != 0) { | ||||
| DRW_stats_group_start("Volumetrics"); | DRW_stats_group_start("Volumetrics"); | ||||
| /* We sample the shadow-maps using shadow sampler. We need to enable Comparison mode. | /* We sample the shadow-maps using shadow sampler. We need to enable Comparison mode. | ||||
| * TODO(fclem) avoid this by using sampler objects.*/ | * TODO(fclem) avoid this by using sampler objects.*/ | ||||
| GPU_texture_bind(sldata->shadow_cube_pool, 0); | |||||
| GPU_texture_compare_mode(sldata->shadow_cube_pool, true); | GPU_texture_compare_mode(sldata->shadow_cube_pool, true); | ||||
| GPU_texture_unbind(sldata->shadow_cube_pool); | |||||
| GPU_texture_bind(sldata->shadow_cascade_pool, 0); | |||||
| GPU_texture_compare_mode(sldata->shadow_cascade_pool, true); | GPU_texture_compare_mode(sldata->shadow_cascade_pool, true); | ||||
| GPU_texture_unbind(sldata->shadow_cascade_pool); | |||||
| GPU_framebuffer_bind(fbl->volumetric_fb); | GPU_framebuffer_bind(fbl->volumetric_fb); | ||||
| DRW_draw_pass(psl->volumetric_world_ps); | DRW_draw_pass(psl->volumetric_world_ps); | ||||
| DRW_draw_pass(psl->volumetric_objects_ps); | DRW_draw_pass(psl->volumetric_objects_ps); | ||||
| GPU_framebuffer_bind(fbl->volumetric_scat_fb); | GPU_framebuffer_bind(fbl->volumetric_scat_fb); | ||||
| DRW_draw_pass(psl->volumetric_scatter_ps); | DRW_draw_pass(psl->volumetric_scatter_ps); | ||||
| ▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines | |||||