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:
Diffstat (limited to 'intern/cycles/integrator/pass_accessor.cpp')
-rw-r--r--intern/cycles/integrator/pass_accessor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/intern/cycles/integrator/pass_accessor.cpp b/intern/cycles/integrator/pass_accessor.cpp
index 4a0b1ed6ece..4ef9ce7ef42 100644
--- a/intern/cycles/integrator/pass_accessor.cpp
+++ b/intern/cycles/integrator/pass_accessor.cpp
@@ -98,7 +98,10 @@ static void pad_pixels(const BufferParams &buffer_params,
const size_t size = static_cast<size_t>(buffer_params.width) * buffer_params.height;
if (destination.pixels) {
- float *pixel = destination.pixels;
+ const size_t pixel_stride = destination.pixel_stride ? destination.pixel_stride :
+ destination.num_components;
+
+ float *pixel = destination.pixels + pixel_stride * destination.offset;
for (size_t i = 0; i < size; i++, pixel += dest_num_components) {
if (dest_num_components >= 3 && src_num_components == 1) {
@@ -113,7 +116,7 @@ static void pad_pixels(const BufferParams &buffer_params,
if (destination.pixels_half_rgba) {
const half one = float_to_half(1.0f);
- half4 *pixel = destination.pixels_half_rgba;
+ half4 *pixel = destination.pixels_half_rgba + destination.offset;
for (size_t i = 0; i < size; i++, pixel++) {
if (dest_num_components >= 3 && src_num_components == 1) {