EEVEE: Reset samples when reflection probes are updated.
This fixes an issue where the number of viewport samples are set to 1 and reprojection is deactivated. In this case the sample that has the data to update the probes is ignored as all samples where already rendered. A tweak in the viewport was needed to fix this issue. Pull Request: https://projects.blender.org/blender/blender/pulls/118654
This commit is contained in:
@@ -133,6 +133,15 @@ void SphereProbeModule::end_sync()
|
||||
update_probes_next_sample_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* When reflection probes are synced the sampling must be reset.
|
||||
*
|
||||
* This fixes issues when using a single non-projected sample. Without resetting the
|
||||
* previous rendered viewport will be drawn and reflection probes will not be updated.
|
||||
* #Instance::render_sample */
|
||||
if (instance_.do_reflection_probe_sync()) {
|
||||
instance_.sampling.reset();
|
||||
}
|
||||
/* If we cannot render probes this redraw make sure we request another redraw. */
|
||||
if (update_probes_next_sample_ && (instance_.do_reflection_probe_sync() == false)) {
|
||||
DRW_viewport_request_redraw();
|
||||
|
||||
Reference in New Issue
Block a user