diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-06 15:47:54 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-06-06 15:51:18 +0300 |
commit | f1fd5ed74fb0afd602f53860d0b2db46189c218a (patch) | |
tree | 47af0711292c8dcf5e157473b21949c706540b75 /source/blender/blenloader | |
parent | 4a52531a11fa27da36f9dbe849ecf0573f35a47b (diff) |
T55333 Workbench: Cavity Shader
A cavity shader based on SSAO. Works on all workbench deferred passes.
Per 3d viewport the cavity shader options can be set as different
shading needed different options. Some global options are in the
Viewport Display of the scene like num samples and distance.
Experimental: Naming of Ridges and Valleys
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f4c61e424ae..83a0f21002a 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1568,5 +1568,18 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + if (!DNA_struct_elem_find(fd->filesdna, "View3DShading", "float", "cavity_valley_factor")) { + for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) { + for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *)sl; + v3d->shading.cavity_valley_factor = 1.0f; + v3d->shading.cavity_ridge_factor = 1.0f; + } + } + } + } + } } } |