Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-07-13 18:31:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-07-21 16:50:35 +0300
commite022753d7a675604e507b156b2dae658cd6d7a0c (patch)
tree6c9cc65bec18fc3502cd9067af50fbadbb41e97e /source/blender/draw/engines/eevee_next/eevee_sampling.cc
parent2bad3577c079a738030ec252e906122c24315e98 (diff)
EEVEE-Next: Add Temporal-AntiAliasing
The improvements over the old implementation are: - Improved history reprojection filter (catmull-rom) - Use proper velocity for history reprojection. - History clipping is now done in YCoCg color space using better algorithm. - Velocity is dilated to keep correct edge anti-aliasing on moving objects. As a result, the 3x3 blocks that made the image smoother in the previous implementation are no longer visible is replaced by correct antialiasing. This removes the velocity resolve pass in order to reduce the bandwidth usage. The velocities are just resolved as they are loadded in the film pass.
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_sampling.cc')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_sampling.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_sampling.cc b/source/blender/draw/engines/eevee_next/eevee_sampling.cc
index 2f180e58a0b..ef2469647ef 100644
--- a/source/blender/draw/engines/eevee_next/eevee_sampling.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_sampling.cc
@@ -57,22 +57,21 @@ void Sampling::end_sync()
{
if (reset_) {
viewport_sample_ = 0;
- if (inst_.is_viewport()) {
- interactive_mode_ = true;
- }
}
- if (interactive_mode_) {
- int interactive_sample_count = min_ii(interactive_sample_max_, sample_count_);
+ if (inst_.is_viewport()) {
+ interactive_mode_ = viewport_sample_ < interactive_mode_threshold;
+ if (interactive_mode_) {
+ int interactive_sample_count = min_ii(interactive_sample_max_, sample_count_);
- if (viewport_sample_ < interactive_sample_count) {
- /* Loop over the same starting samples. */
- sample_ = sample_ % interactive_sample_count;
- }
- else {
- /* Break out of the loop and resume normal pattern. */
- sample_ = interactive_sample_count;
- interactive_mode_ = false;
+ if (viewport_sample_ < interactive_sample_count) {
+ /* Loop over the same starting samples. */
+ sample_ = sample_ % interactive_sample_count;
+ }
+ else {
+ /* Break out of the loop and resume normal pattern. */
+ sample_ = interactive_sample_count;
+ }
}
}
}
@@ -138,8 +137,6 @@ void Sampling::step()
viewport_sample_++;
sample_++;
- std::cout << sample_ << " " << viewport_sample_ << std::endl;
-
reset_ = false;
}
@@ -218,7 +215,7 @@ void Sampling::dof_disk_sample_get(float *r_radius, float *r_theta) const
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Sampling patterns
+/** \name Cumulative Distribution Function (CDF)
* \{ */
/* Creates a discrete cumulative distribution function table from a given curvemapping.