forked from bartvdbraak/blender
Merge remote-tracking branch 'origin/blender-v2.90-release'
This commit is contained in:
commit
c44251c7d7
@ -363,7 +363,8 @@ void BlenderSession::do_write_update_render_tile(RenderTile &rtile,
|
||||
PassType pass_type = BlenderSync::get_pass_type(b_pass);
|
||||
int components = b_pass.channels();
|
||||
|
||||
rtile.buffers->set_pass_rect(pass_type, components, (float *)b_pass.rect());
|
||||
rtile.buffers->set_pass_rect(
|
||||
pass_type, components, (float *)b_pass.rect(), rtile.num_samples);
|
||||
}
|
||||
|
||||
end_render_result(b_engine, b_rr, false, false, false);
|
||||
|
@ -459,7 +459,7 @@ bool RenderBuffers::get_pass_rect(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RenderBuffers::set_pass_rect(PassType type, int components, float *pixels)
|
||||
bool RenderBuffers::set_pass_rect(PassType type, int components, float *pixels, int samples)
|
||||
{
|
||||
if (buffer.data() == NULL) {
|
||||
return false;
|
||||
@ -482,8 +482,17 @@ bool RenderBuffers::set_pass_rect(PassType type, int components, float *pixels)
|
||||
assert(pass.components == components);
|
||||
|
||||
for (int i = 0; i < size; i++, out += pass_stride, pixels += components) {
|
||||
if (pass.filter) {
|
||||
/* Scale by the number of samples, inverse of what we do in get_pass_rect.
|
||||
* A better solution would be to remove the need for set_pass_rect entirely,
|
||||
* and change baking to bake multiple objects in a tile at once. */
|
||||
for (int j = 0; j < components; j++) {
|
||||
out[j] = pixels[j];
|
||||
out[j] = pixels[j] * samples;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* For non-filtered passes just straight copy, these may contain non-float data. */
|
||||
memcpy(out, pixels, sizeof(float) * components);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ class RenderBuffers {
|
||||
const string &name, float exposure, int sample, int components, float *pixels);
|
||||
bool get_denoising_pass_rect(
|
||||
int offset, float exposure, int sample, int components, float *pixels);
|
||||
bool set_pass_rect(PassType type, int components, float *pixels);
|
||||
bool set_pass_rect(PassType type, int components, float *pixels, int samples);
|
||||
};
|
||||
|
||||
/* Display Buffer
|
||||
|
@ -253,6 +253,8 @@ void Pass::add(PassType type, vector<Pass> &passes, const char *name)
|
||||
case PASS_BAKE_PRIMITIVE:
|
||||
case PASS_BAKE_DIFFERENTIAL:
|
||||
pass.components = 4;
|
||||
pass.exposure = false;
|
||||
pass.filter = false;
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
|
@ -455,10 +455,10 @@ void RNA_def_main_cachefiles(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
void RNA_def_main_paintcurves(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
void RNA_def_main_workspaces(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#ifdef WITH_PARTICLE_NODES
|
||||
#ifdef WITH_HAIR_NODES
|
||||
void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#endif
|
||||
#ifdef WITH_HAIR_NODES
|
||||
#ifdef WITH_PARTICLE_NODES
|
||||
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#endif
|
||||
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
|
Loading…
Reference in New Issue
Block a user