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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2018-03-01 13:54:01 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2018-03-01 13:54:01 +0300
commit7377d411b47d50cd943cd33e3e55c0409bb79f91 (patch)
treee623f792356d08ea03dd37b28de0b57a1695b3af /intern/cycles/render/image.cpp
parent172614fb7dac799d373e778a541e8d9f78228221 (diff)
Cycles volume: fast empty space optimization by generating a tight mesh
around the volume. We generate a tight mesh around the active voxels of the volume in order to effectively skip empty space, and start volume ray marching as close to interesting volume data as possible. See code comments for details on how the mesh generation algorithm works. This gives up to 2x speedups in some scenes. Reviewed by: brecht, dingto Reviewers: #cycles Subscribers: lvxejay, jtheninja, brecht Differential Revision: https://developer.blender.org/D3038
Diffstat (limited to 'intern/cycles/render/image.cpp')
-rw-r--r--intern/cycles/render/image.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index de46599e1db..9c5e32e8219 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -84,6 +84,16 @@ bool ImageManager::set_animation_frame_update(int frame)
return false;
}
+device_memory *ImageManager::image_memory(int flat_slot)
+{
+ ImageDataType type;
+ int slot = flattened_slot_to_type_index(flat_slot, &type);
+
+ Image *img = images[type][slot];
+
+ return img->mem;
+}
+
bool ImageManager::get_image_metadata(const string& filename,
void *builtin_data,
ImageMetaData& metadata)