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:
authorClément Foucault <foucault.clem@gmail.com>2017-11-25 00:29:18 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-11-25 00:29:28 +0300
commit7cbc7dd90499f98e3f44f86fdacae5365e53cd77 (patch)
tree63eecf24db2b50ec51e9241eb20c20ecde7a8a66 /source/blender/draw/engines/eevee/eevee_materials.c
parent8d4aa6bf44106bbc1605151c05ae6d5bb5c30e29 (diff)
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.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_materials.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_materials.c4
1 files changed, 4 insertions, 0 deletions
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;