diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 02:49:54 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 02:49:54 +0300 |
commit | f8b14305668ff7b1f3ba6f886b9e1881c764b201 (patch) | |
tree | 5f773bf0b3a723e7a3b895e0f41bcaecd93f75ad /source/blender/makesrna/intern/rna_material.c | |
parent | 89e9f6ea79078f846d78b6effda2ae8a8a32de84 (diff) |
Eevee: Initial Separable Subsurface Scattering implementation.
How to use:
- Enable subsurface scattering in the render options.
- Add Subsurface BSDF to your shader.
- Check "Screen Space Subsurface Scattering" in the material panel options.
This initial implementation has a few limitations:
- only supports gaussian SSS.
- Does not support principled shader.
- The radius parameters is baked down to a number of samples and then put into an UBO. This means the radius input socket cannot be used. You need to tweak the default vector directly.
- The "texture blur" is considered as always set to 1
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 7f23cd78779..a78ad4262ce 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1877,6 +1877,11 @@ void RNA_def_material(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Screen Space Refraction", "Use raytraced screen space refractions"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); + prop = RNA_def_property(srna, "use_screen_subsurface", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_SS_SUBSURFACE); + RNA_def_property_ui_text(prop, "Screen Space Subsurface Scattering", "Use post process subsurface scattering"); + RNA_def_property_update(prop, 0, "rna_Material_draw_update"); + prop = RNA_def_property(srna, "refraction_depth", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "refract_depth"); RNA_def_property_range(prop, 0.0f, FLT_MAX); |