From 7cbc7dd90499f98e3f44f86fdacae5365e53cd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 24 Nov 2017 22:29:18 +0100 Subject: Eevee: SSS: Add separated Albedo option. This option prevent from automatically blurring the albedo color applied to the SSS. While this is great for preserving details it can bleed more light onto the nearby objects since the blurring will be done on pure "white" irradiance. This issue is to be tackled in a separate commit. --- source/blender/draw/engines/eevee/eevee_materials.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/draw/engines/eevee/eevee_materials.c') diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 7069e46edf1..77d57716852 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -307,6 +307,9 @@ static char *eevee_get_defines(int options) if ((options & VAR_MAT_SSS) != 0) { BLI_dynstr_appendf(ds, "#define USE_SSS\n"); } + if ((options & VAR_MAT_SSSALBED) != 0) { + BLI_dynstr_appendf(ds, "#define USE_SSS_ALBEDO\n"); + } if ((options & VAR_MAT_TRANSLUC) != 0) { BLI_dynstr_appendf(ds, "#define USE_TRANSLUCENCY\n"); } @@ -651,6 +654,7 @@ struct GPUMaterial *EEVEE_material_mesh_get( if (use_multiply) options |= VAR_MAT_MULT; if (use_refract) options |= VAR_MAT_REFRACT; if (use_sss) options |= VAR_MAT_SSS; + if (use_sss && vedata->stl->effects->sss_separate_albedo) options |= VAR_MAT_SSSALBED; if (use_translucency) options |= VAR_MAT_TRANSLUC; if (vedata->stl->effects->use_volumetrics && use_blend) options |= VAR_MAT_VOLUME; -- cgit v1.2.3