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:
authorBrecht Van Lommel <brecht@blender.org>2019-05-10 22:39:58 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2020-05-15 21:25:24 +0300
commitd9773edaa394f61393f9c8b80275e62f74306097 (patch)
tree232b771b341e98a5403af16791bdcca133cb1edd /source/blender/render/extern/include
parent3ff8ca60e94db2584ca76e323a54c738e677d5f8 (diff)
Cycles: code refactor to bake using regular render session and tiles
There should be no user visible change from this, except that tile size now affects performance. The goal here is to simplify bake denoising in D3099, letting it reuse more denoising tiles and pass code. A lot of code is now shared with regular rendering, with the two main differences being that we read some render result passes from the bake API when starting to render a tile, and call the bake kernel instead of the path trace kernel. With this kind of design where Cycles asks for tiles from the bake API, it should eventually be easier to reduce memory usage, show tiles as they are baked, or bake multiple passes at once, though there's still quite some work needed for that. Reviewers: #cycles Subscribers: monio, wmatyjewicz, lukasstockner97, michaelknubben Differential Revision: https://developer.blender.org/D3108
Diffstat (limited to 'source/blender/render/extern/include')
-rw-r--r--source/blender/render/extern/include/RE_bake.h2
-rw-r--r--source/blender/render/extern/include/RE_engine.h14
2 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h
index 372defbe8db..59e34404074 100644
--- a/source/blender/render/extern/include/RE_bake.h
+++ b/source/blender/render/extern/include/RE_bake.h
@@ -67,7 +67,7 @@ bool RE_bake_engine(struct Render *re,
struct Object *object,
const int object_id,
const BakePixel pixel_array[],
- const size_t num_pixels,
+ const BakeImages *bake_images,
const int depth,
const eScenePassType pass_type,
const int pass_filter,
diff --git a/source/blender/render/extern/include/RE_engine.h b/source/blender/render/extern/include/RE_engine.h
index fd55a2a01df..82b45ba9d4a 100644
--- a/source/blender/render/extern/include/RE_engine.h
+++ b/source/blender/render/extern/include/RE_engine.h
@@ -87,11 +87,8 @@ typedef struct RenderEngineType {
struct Object *object,
const int pass_type,
const int pass_filter,
- const int object_id,
- const struct BakePixel *pixel_array,
- const int num_pixels,
- const int depth,
- void *result);
+ const int width,
+ const int height);
void (*view_update)(struct RenderEngine *engine,
const struct bContext *context,
@@ -140,6 +137,13 @@ typedef struct RenderEngine {
struct ReportList *reports;
+ struct {
+ const struct BakePixel *pixels;
+ float *result;
+ int width, height, depth;
+ int object_id;
+ } bake;
+
/* Depsgraph */
struct Depsgraph *depsgraph;