From 852cdd476b5572b56418d377e379c07253363eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 17 Feb 2020 14:14:30 +0100 Subject: ColorManagement: Dithering Improvement - Unlock property range. - Use triangular noise to keep perceptual noise error more uniform. Remap range to preserve perceptual intensity. - Center noise distribution around 0 for GPU implementation because of rounding. - Do dithering after merging overlays. Effect of using triangular noise is not really noticeable if you don't use really low bitdepth. But doing a test in the shader were we artificially reduce the bitdepth (`col = (col * 16) / 16;`) reveals the real difference. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6850 --- source/blender/makesrna/intern/rna_scene.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_scene.c') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index cc0903ed2c8..5e5bafdc178 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5683,7 +5683,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "dither_intensity"); - RNA_def_property_range(prop, 0.0f, 2.0f); + RNA_def_property_range(prop, 0.0, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0, 2.0, 0.1, 2); RNA_def_property_ui_text( prop, "Dither Intensity", -- cgit v1.2.3