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 <brechtvanlommel@pandora.be>2012-01-25 21:23:52 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-25 21:23:52 +0400
commitf99343d3b8676543e2bd6acd6ee2274c21b1b388 (patch)
treefd40cd33691a783f82cf877e774d1b3a64d91ed3 /intern/cycles/render/buffers.h
parent14f475fccad7158098ddecc285c617f990b2f8b5 (diff)
Cycles: Render Passes
Currently supported passes: * Combined, Z, Normal, Object Index, Material Index, Emission, Environment, Diffuse/Glossy/Transmission x Direct/Indirect/Color Not supported yet: * UV, Vector, Mist Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow, also for environment importance sampling. Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
Diffstat (limited to 'intern/cycles/render/buffers.h')
-rw-r--r--intern/cycles/render/buffers.h46
1 files changed, 18 insertions, 28 deletions
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index f4a9b37c09b..3062e5ae3e4 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -21,6 +21,10 @@
#include "device_memory.h"
+#include "film.h"
+
+#include "kernel_types.h"
+
#include "util_string.h"
#include "util_thread.h"
#include "util_types.h"
@@ -45,32 +49,16 @@ public:
int full_width;
int full_height;
- BufferParams()
- {
- width = 0;
- height = 0;
-
- full_x = 0;
- full_y = 0;
- full_width = 0;
- full_height = 0;
- }
-
- void get_offset_stride(int& offset, int& stride)
- {
- offset = -(full_x + full_y*width);
- stride = width;
- }
-
- bool modified(const BufferParams& params)
- {
- return !(full_x == params.full_x
- && full_y == params.full_y
- && width == params.width
- && height == params.height
- && full_width == params.full_width
- && full_height == params.full_height);
- }
+ /* passes */
+ vector<Pass> passes;
+
+ /* functions */
+ BufferParams();
+
+ void get_offset_stride(int& offset, int& stride);
+ bool modified(const BufferParams& params);
+ void add_pass(PassType type);
+ int get_passes_size();
};
/* Render Buffers */
@@ -80,7 +68,7 @@ public:
/* buffer parameters */
BufferParams params;
/* float buffer */
- device_vector<float4> buffer;
+ device_vector<float> buffer;
/* random number generator state */
device_vector<uint> rng_state;
/* mutex, must be locked manually by callers */
@@ -90,7 +78,9 @@ public:
~RenderBuffers();
void reset(Device *device, BufferParams& params);
- float4 *copy_from_device(float exposure, int sample);
+
+ bool copy_from_device();
+ bool get_pass(PassType type, float exposure, int sample, int components, float *pixels);
protected:
void device_free();