forked from bartvdbraak/blender
Fix T43550: Bug in Cycles Bake Texture
Issue was caused by the changes in 7b16fda which changed the initial state for rng. This commit makes it so the same initial hash is used (which solves the regression without distorting AA-looking image. It also makes it so OpenCL compiler is happy about this code (before this change it'll complain about trying to cast private variable to global one).
This commit is contained in:
parent
f7a2a36b31
commit
1b92dfa961
@ -199,9 +199,13 @@ ccl_device void kernel_bake_evaluate(KernelGlobals *kg, ccl_global uint4 *input,
|
||||
|
||||
/* random number generator */
|
||||
RNG rng = cmj_hash(offset + i, kernel_data.integrator.seed);
|
||||
uint rng_state = cmj_hash(i, kernel_data.integrator.seed);
|
||||
float filter_x, filter_y;
|
||||
path_rng_init(kg, &rng_state, sample, num_samples, &rng, 0, 0, &filter_x, &filter_y);
|
||||
if(sample == 0) {
|
||||
filter_x = filter_y = 0.5f;
|
||||
}
|
||||
else {
|
||||
path_rng_2D(kg, &rng, sample, num_samples, PRNG_FILTER_U, &filter_x, &filter_x);
|
||||
}
|
||||
|
||||
/* subpixel u/v offset */
|
||||
if(sample > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user