Fix T41471 Cycles Bake: Setting small tile size results in wrong bake with stripes rather than the expected noise pattern

This problem was introduced in 983cbafd18
Basically the issue is that we were not getting a unique index in the
baking routine for the RNG (random number generator).

Reviewers: sergey

Differential Revision: https://developer.blender.org/D749
This commit is contained in:
Dalai Felinto
2014-08-19 11:39:40 +02:00
parent 37da1dadb6
commit 8d3cc431d7
14 changed files with 43 additions and 31 deletions

View File

@@ -676,6 +676,7 @@ public:
const int shader_chunk_size = 65536;
const int start = task.shader_x;
const int end = task.shader_x + task.shader_w;
int offset = task.offset;
bool canceled = false;
for(int sample = 0; sample < task.num_samples && !canceled; sample++) {
@@ -688,6 +689,7 @@ public:
&task.shader_eval_type,
&shader_x,
&shader_w,
&offset,
&sample};
/* launch kernel */