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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-05 12:05:14 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-05 12:05:14 +0400
commit759ea4078782ace683a3e835166b7f324c8e3224 (patch)
tree80b50138b42f89a247612c9461d467391014683d /source/blender/blenloader
parent6eec49ed20fb3a8032718d5f4b9a3e774098df3f (diff)
Render engines: replace number of x/y tiles with tile size
Now tile size is setting up explicitly instead of using number of tiles. This allows better control over GPU performance, where having tiles aligned to specific size makes lots of sense. Still to come: need to update startup.blend to make tiles size 64x64.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 38213878ba1..38e92961075 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8297,7 +8297,23 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+ }
+
+ {
+ /* convert tiles size from resolution and number of tiles */
+ {
+ Scene *scene;
+ for (scene = main->scene.first; scene; scene = scene->id.next) {
+ if (scene->r.tilex == 0 || scene->r.tiley == 1) {
+ /* scene could be set for panoramic rendering, so clamp with the
+ * lowest possible tile size value
+ */
+ scene->r.tilex = max_ii(scene->r.xsch * scene->r.size / scene->r.xparts / 100, 8);
+ scene->r.tiley = max_ii(scene->r.ysch * scene->r.size / scene->r.yparts / 100, 8);
+ }
+ }
+ }
}
{