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>2008-03-04 22:58:22 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-03-04 22:58:22 +0300
commit4ba2162e636c78001ffc508a64423357745ed868 (patch)
tree23f1b401ce3f640f38f85807e2820d218033f847 /source/blender/render/intern/include
parent8b5a5b71d53a139212bd6bfb630e3ea87b533727 (diff)
Bugfix: the shadow samplenr increment to reuse shadow results in
the renderer could lead to results being reused for unrelated points, result was one wrong pixel or strand per part. Now instead of setting the sample counter to 0 multiple times, it keeps a global counter per thread for the whole render.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r--source/blender/render/intern/include/render_types.h3
-rw-r--r--source/blender/render/intern/include/shading.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 271bbd3de00..edb5f1442b2 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -152,6 +152,9 @@ struct Render
float jit[32][2];
QMCSampler *qsa;
+ /* shadow counter, detect shadow-reuse for shaders */
+ int shadowsamplenr[BLENDER_MAX_THREADS];
+
/* scene, and its full copy of renderdata and world */
Scene *scene;
RenderData r;
diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h
index e015309784d..6f1cb8dd7a9 100644
--- a/source/blender/render/intern/include/shading.h
+++ b/source/blender/render/intern/include/shading.h
@@ -47,8 +47,6 @@ typedef struct ShadeSample {
/* could be malloced once */
ShadeInput shi[RE_MAX_OSA];
ShadeResult shr[RE_MAX_OSA];
-
- int samplenr; /* counter, detect shadow-reuse for shaders */
} ShadeSample;