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>2013-08-31 03:49:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-31 03:49:38 +0400
commit29f6616d609fbd92cf313b0fdec555c2fcb4ede0 (patch)
treee0c9500368c5210071cb841ea86f5674b0cf6f25 /intern/cycles/render/buffers.h
parent60ff60dcdc9f43891fb8a19e10f9bb7964a539bf (diff)
Cycles: viewport render now takes scene color management settings into account,
except for curves, that's still missing from the OpenColorIO GLSL shader. The pixels are stored in a half float texture, converterd from full float with native GPU instructions and SIMD on the CPU, so it should be pretty quick. Using a GLSL shader is useful for GPU render because it avoids a copy through CPU memory.
Diffstat (limited to 'intern/cycles/render/buffers.h')
-rw-r--r--intern/cycles/render/buffers.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/intern/cycles/render/buffers.h b/intern/cycles/render/buffers.h
index 2936a224d43..0b1f9010e75 100644
--- a/intern/cycles/render/buffers.h
+++ b/intern/cycles/render/buffers.h
@@ -87,8 +87,8 @@ protected:
/* Display Buffer
*
- * The buffer used for drawing during render, filled by tonemapping the render
- * buffers and converting to uchar4 storage. */
+ * The buffer used for drawing during render, filled by converting the render
+ * buffers to byte of half float storage */
class DisplayBuffer {
public:
@@ -100,10 +100,13 @@ public:
int draw_width, draw_height;
/* draw alpha channel? */
bool transparent;
- /* byte buffer for tonemapped result */
- device_vector<uchar4> rgba;
+ /* use half float? */
+ bool half_float;
+ /* byte buffer for converted result */
+ device_vector<uchar4> rgba_byte;
+ device_vector<half4> rgba_half;
- DisplayBuffer(Device *device);
+ DisplayBuffer(Device *device, bool linear = false);
~DisplayBuffer();
void reset(Device *device, BufferParams& params);
@@ -113,6 +116,8 @@ public:
void draw(Device *device);
bool draw_ready();
+ device_memory& rgba_data();
+
protected:
void device_free();
@@ -134,7 +139,6 @@ public:
device_ptr buffer;
device_ptr rng_state;
- device_ptr rgba;
RenderBuffers *buffers;