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-26 18:55:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-26 18:55:25 +0400
commitf8bddbd347e7ded7a14187ca96b69dfec70c20cd (patch)
tree28b5c642d3496cd40545f766d444017ae2934c01 /intern/cycles/render/buffers.cpp
parent331c235d93ef77bce3c5d5b668d433bfbb75ca88 (diff)
Cycles: fix issues rendering second render layer passes, and avoid unnecessary
clear of buffer.
Diffstat (limited to 'intern/cycles/render/buffers.cpp')
-rw-r--r--intern/cycles/render/buffers.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index 08dda944111..56219482ef0 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -157,10 +157,17 @@ bool RenderBuffers::get_pass(PassType type, float exposure, int sample, int comp
assert(pass.components == components);
/* scalar */
- for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
- float f = *in;
-
- pixels[0] = f*scale_exposure;
+ if(type == PASS_DEPTH) {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
+ float f = *in;
+ pixels[0] = (f == 0.0f)? 1e10f: f*scale_exposure;
+ }
+ }
+ else {
+ for(int i = 0; i < size; i++, in += pass_stride, pixels++) {
+ float f = *in;
+ pixels[0] = f*scale_exposure;
+ }
}
}
else if(components == 3) {