[Bf-blender-cvs] [1753177ad8a] master: Partial fix T60148: EEVEE hangs when anamorphic bokeh is too low

Dalai Felinto noreply at git.blender.org
Fri Jan 4 14:27:49 CET 2019


Commit: 1753177ad8acfabbcc74c3d8e20fa874f2b97167
Author: Dalai Felinto
Date:   Fri Jan 4 11:15:23 2019 -0200
Branches: master
https://developer.blender.org/rB1753177ad8acfabbcc74c3d8e20fa874f2b97167

Partial fix T60148: EEVEE hangs when anamorphic bokeh is too low

Fixed by setting the limit to the original limit I used for Cycles.
Rendering still goes extremely slow when bokeh is lower than 1.0.

But at least now it is "waitable". With lower numbers than 0.01 I don't
think we would ever get a render to finish.

@fclem feel free to address the real root of the problem, but I'm afraid
it may be a limitation of the algorithm you are using.

===================================================================

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/makesrna/intern/rna_scene.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index d8ed41c4d55..3b2950891f7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2741,5 +2741,12 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 				}
 			}
 		}
+
+		/* Fix anamorphic bokeh eevee rna limits.*/
+		for (Camera *ca = bmain->camera.first; ca; ca = ca->id.next) {
+			if (ca->gpu_dof.ratio < 0.01f) {
+				ca->gpu_dof.ratio = 0.01f;
+			}
+		}
 	}
 }
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ee306558a68..85c2612ea85 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -4112,7 +4112,7 @@ static void rna_def_gpu_dof_fx(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_ui_text(prop, "Ratio", "Distortion to simulate anamorphic lens bokeh");
 	RNA_def_property_float_default(prop, 1.0f);
-	RNA_def_property_range(prop, 0.0000001f, FLT_MAX);
+	RNA_def_property_range(prop, 0.01f, FLT_MAX);
 	RNA_def_property_ui_range(prop, 1.0f, 2.0f, 0.1, 3);
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 }



More information about the Bf-blender-cvs mailing list