diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-12-26 01:04:51 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-12-26 01:05:45 +0300 |
commit | e8e92dffed05f86ffea2f378e115285a105d6fd4 (patch) | |
tree | 6727fc5b48274b160501f2ca0137628ec2731a91 /intern/cycles/render/bake.cpp | |
parent | 7e4568a93932dd7983846a00e3cf361d1754103c (diff) |
Fix T53607: Cycles normal map baking problem when there is no bump.
Diffstat (limited to 'intern/cycles/render/bake.cpp')
-rw-r--r-- | intern/cycles/render/bake.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/render/bake.cpp b/intern/cycles/render/bake.cpp index aeb5d1c1316..1fef7a0188f 100644 --- a/intern/cycles/render/bake.cpp +++ b/intern/cycles/render/bake.cpp @@ -151,6 +151,10 @@ bool BakeManager::bake(Device *device, DeviceScene *dscene, Scene *scene, Progre progress.reset_sample(); progress.set_total_pixel_samples(total_pixel_samples); + /* needs to be up to date for baking specific AA samples */ + dscene->data.integrator.aa_samples = num_samples; + device->const_copy_to("__data", &dscene->data, sizeof(dscene->data)); + for(size_t shader_offset = 0; shader_offset < num_pixels; shader_offset += m_shader_limit) { size_t shader_size = (size_t)fminf(num_pixels - shader_offset, m_shader_limit); @@ -175,9 +179,6 @@ bool BakeManager::bake(Device *device, DeviceScene *dscene, Scene *scene, Progre d_output.zero_to_device(); d_input.copy_to_device(); - /* needs to be up to data for attribute access */ - device->const_copy_to("__data", &dscene->data, sizeof(dscene->data)); - DeviceTask task(DeviceTask::SHADER); task.shader_input = d_input.device_pointer; task.shader_output = d_output.device_pointer; |