Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_subsurface.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_subsurface.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_subsurface.c b/source/blender/draw/engines/eevee/eevee_subsurface.c
index b31925e8eff..4d29e597dae 100644
--- a/source/blender/draw/engines/eevee/eevee_subsurface.c
+++ b/source/blender/draw/engines/eevee/eevee_subsurface.c
@@ -333,7 +333,7 @@ void EEVEE_subsurface_data_render(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Dat
}
}
-void EEVEE_subsurface_compute(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
+void EEVEE_subsurface_compute(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
{
EEVEE_PassList *psl = vedata->psl;
EEVEE_StorageList *stl = vedata->stl;
@@ -356,6 +356,15 @@ void EEVEE_subsurface_compute(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v
}
if (!DRW_pass_is_empty(psl->sss_translucency_ps)) {
+ /* We sample the shadowmaps using normal sampler. We need to disable Comparison mode.
+ * TODO(fclem) avoid this by using sampler objects.*/
+ GPU_texture_bind(sldata->shadow_cube_pool, 0);
+ GPU_texture_compare_mode(sldata->shadow_cube_pool, false);
+ GPU_texture_unbind(sldata->shadow_cube_pool);
+ GPU_texture_bind(sldata->shadow_cascade_pool, 0);
+ GPU_texture_compare_mode(sldata->shadow_cascade_pool, false);
+ GPU_texture_unbind(sldata->shadow_cascade_pool);
+
GPU_framebuffer_bind(fbl->sss_translucency_fb);
DRW_draw_pass(psl->sss_translucency_ps);
}