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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-07-24 20:06:12 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-07-24 20:24:50 +0300
commitad632a13d98e9d29c418a4acd5ec2848d6b71d7b (patch)
treebb3f523574c18d6d55286757ecf40ee77c8a30b9 /source
parentb1c49b3b2a429a27e8a82e4ed8034a01583333c8 (diff)
EEVEE-Next: Decorelate Large filter spiral sampling
This avoids correlation artifacts with the jitter pattern itself. Also try to reduce the visible spiral pattern.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_film.cc2
-rw-r--r--source/blender/draw/engines/eevee_next/eevee_sampling.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_film.cc b/source/blender/draw/engines/eevee_next/eevee_film.cc
index cdd753b988d..18e0452da25 100644
--- a/source/blender/draw/engines/eevee_next/eevee_film.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_film.cc
@@ -522,7 +522,7 @@ void Film::update_sample_table()
int i = 0;
for (FilmSample &sample : sample_table) {
/* TODO(fclem): Own RNG. */
- float2 random_2d = inst_.sampling.rng_2d_get(SAMPLING_FILTER_U);
+ float2 random_2d = inst_.sampling.rng_2d_get(SAMPLING_SSS_U);
/* This randomization makes sure we converge to the right result but also makes nearest
* neighbor filtering not converging rapidly. */
random_2d.x = (random_2d.x + i) / float(FILM_PRECOMP_SAMPLE_MAX);
diff --git a/source/blender/draw/engines/eevee_next/eevee_sampling.cc b/source/blender/draw/engines/eevee_next/eevee_sampling.cc
index aa62c3dd38a..1d320c75f16 100644
--- a/source/blender/draw/engines/eevee_next/eevee_sampling.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_sampling.cc
@@ -177,7 +177,7 @@ float2 Sampling::sample_disk(const float2 &rand)
float2 Sampling::sample_spiral(const float2 &rand)
{
/* Fibonacci spiral. */
- float omega = M_PI * (1.0f + sqrtf(5.0f)) * rand.x;
+ float omega = 4.0f * M_PI * (1.0f + sqrtf(5.0f)) * rand.x;
float r = sqrtf(rand.x);
/* Random rotation. */
omega += rand.y * 2.0f * M_PI;