diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 21:18:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 21:18:19 +0300 |
commit | d6747f310f1235084e37d871212fb66aff37ba13 (patch) | |
tree | c209d23b1f57045f6806a1f3da84ffa852bd7149 /source/blender/blenloader | |
parent | f0a20ae1c9505342721f841bcf537d465b5a54eb (diff) |
Eevee: Material: Decouple transparent shadows from blend mode
This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.
Versionning ensure that old behavior is transfered to new rendering logic.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 522d036818d..960fb3b417c 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -2945,6 +2945,15 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } FOREACH_NODETREE_END; } + if (!MAIN_VERSION_ATLEAST(bmain, 280, 53)) { + for (Material *mat = bmain->materials.first; mat; mat = mat->id.next) { + /* Eevee: Keep material appearance consistent with previous behavior. */ + if (!mat->use_nodes || !mat->nodetree || mat->blend_method == MA_BM_SOLID) { + mat->blend_shadow = MA_BS_SOLID; + } + } + } + { /* Versioning code until next subversion bump goes here. */ } |