diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2018-01-12 02:50:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-12 03:34:07 +0300 |
commit | cce280dd6767bb4588a301f2b966d1b959b01f6b (patch) | |
tree | 094914017f73d09e8cf77a5df3401a22e78b4d94 /intern/cycles/render/scene.cpp | |
parent | 2dbcc17897f18090440ad0756fbc35210a01c9b8 (diff) |
Cycles: add offscreen dicing scale and dicing camera.
The offscreen dicing scale helps to significantly reduce memory usage,
by reducing the dicing rate for objects the further they are outside of
the camera view.
The dicing camera can be specified now, to keep the geometry fixed and
avoid crawling artifacts in animation. It is also useful for debugging,
to see the tesselation from a different camera location.
Differential Revision: https://developer.blender.org/D2891
Diffstat (limited to 'intern/cycles/render/scene.cpp')
-rw-r--r-- | intern/cycles/render/scene.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index 260a325206c..8ab4dd48552 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -85,6 +85,7 @@ Scene::Scene(const SceneParams& params_, Device *device) memset(&dscene.data, 0, sizeof(dscene.data)); camera = new Camera(); + dicing_camera = new Camera(); lookup_tables = new LookupTables(); film = new Film(); background = new Background(); @@ -155,6 +156,7 @@ void Scene::free_memory(bool final) if(final) { delete lookup_tables; delete camera; + delete dicing_camera; delete film; delete background; delete integrator; @@ -359,6 +361,7 @@ void Scene::reset() /* ensure all objects are updated */ camera->tag_update(); + dicing_camera->tag_update(); film->tag_update(this); background->tag_update(this); integrator->tag_update(this); |