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:
authorAdam Nydahl <Loginer>2019-05-27 18:07:17 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-27 18:13:09 +0300
commit7353e0563ee2aa0c6393112139ea38debdd18b54 (patch)
tree8d85f0ae6966b4cb3b6499c4dc04da09f7965602 /source
parent7a308e65ef1f85629dc3a766452407924e00f75d (diff)
Eevee: Fix Aliasing in Light Probes
Differential Revision: https://developer.blender.org/D4869
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c3
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c13
-rw-r--r--source/blender/makesrna/intern/rna_scene.c2
4 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 872f99ff813..971e878ccbc 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -916,7 +916,7 @@ void BKE_scene_init(Scene *sce)
sce->eevee.gi_cubemap_draw_size = 0.3f;
sce->eevee.gi_irradiance_draw_size = 0.1f;
sce->eevee.gi_irradiance_smoothing = 0.1f;
- sce->eevee.gi_filter_quality = 1.0f;
+ sce->eevee.gi_filter_quality = 3.0f;
sce->eevee.taa_samples = 16;
sce->eevee.taa_render_samples = 64;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 65dc38bd4b9..d22620f9224 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -458,6 +458,9 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
copy_v3_v3(scene->display.light_direction, (float[3]){M_SQRT1_3, M_SQRT1_3, M_SQRT1_3});
copy_v2_fl2(scene->safe_areas.title, 0.1f, 0.05f);
copy_v2_fl2(scene->safe_areas.action, 0.035f, 0.035f);
+
+ /* Change default cubemap quality. */
+ scene->eevee.gi_filter_quality = 3.0f;
}
if (app_template == NULL) {
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index 388a8b5e73d..78565f9c465 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -1053,7 +1053,7 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata,
/* 3 - Render to probe array to the specified layer, do prefiltering. */
int mipsize = GPU_texture_width(light_cache->cube_tx.tex);
for (int i = 0; i < maxlevel + 1; i++) {
- float bias = (i == 0) ? -1.0f : 1.0f;
+ float bias = 0.0f;
pinfo->texel_size = 1.0f / (float)mipsize;
pinfo->padding_size = (i == maxlevel) ? 0 : (float)(1 << (maxlevel - i - 1));
pinfo->padding_size *= pinfo->texel_size;
@@ -1063,22 +1063,27 @@ void EEVEE_lightbake_filter_glossy(EEVEE_ViewLayerData *sldata,
pinfo->roughness *= pinfo->roughness; /* Distribute Roughness accros lod more evenly */
CLAMP(pinfo->roughness, 1e-8f, 0.99999f); /* Avoid artifacts */
-#if 1 /* Variable Sample count (fast) */
+#if 1 /* Variable Sample count and bias (fast) */
switch (i) {
case 0:
pinfo->samples_len = 1.0f;
+ bias = -1.0f;
break;
case 1:
- pinfo->samples_len = 16.0f;
+ pinfo->samples_len = 32.0f;
+ bias = 1.0f;
break;
case 2:
- pinfo->samples_len = 32.0f;
+ pinfo->samples_len = 40.0f;
+ bias = 2.0f;
break;
case 3:
pinfo->samples_len = 64.0f;
+ bias = 2.0f;
break;
default:
pinfo->samples_len = 128.0f;
+ bias = 2.0f;
break;
}
#else /* Constant Sample count (slow) */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 894f9bfbe3e..a4b305d36ae 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -6584,7 +6584,7 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
prop = RNA_def_property(srna, "gi_filter_quality", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_default(prop, 1.0f);
+ RNA_def_property_float_default(prop, 3.0f);
RNA_def_property_ui_text(
prop, "Filter Quality", "Take more samples during cubemap filtering to remove artifacts");
RNA_def_property_range(prop, 1.0f, 8.0f);