[Bf-blender-cvs] [821aa86d987] soc-2018-npr: Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr

Nick Wu noreply at git.blender.org
Mon Nov 26 13:28:10 CET 2018


Commit: 821aa86d98784a529bc80820d7e7164a04eb2fce
Author: Nick Wu
Date:   Wed Nov 14 11:32:17 2018 +0800
Branches: soc-2018-npr
https://developer.blender.org/rB821aa86d98784a529bc80820d7e7164a04eb2fce

Merge remote-tracking branch 'remotes/origin/blender2.8' into soc-2018-npr

# Conflicts:
#	release/scripts/startup/bl_ui/properties_scene.py

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



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

diff --cc source/blender/makesdna/DNA_scene_types.h
index 27d499a5cba,d235cef1109..e6d38cc03ad
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@@ -1485,70 -1506,11 +1506,73 @@@ typedef struct SceneEEVEE 
  
  	struct LightCache *light_cache;
  	char light_cache_info[64];
+ 
+ 	float overscan;
+ 	float pad;
  } SceneEEVEE;
  
 +
 +/* LANPR Global Config */
 +
 +struct LANPR_RenderBuffer;
 +struct LANPR_LineLayer;
 +
 +typedef struct SceneLANPR {
 +
 +	int master_mode;
 +
 +	int enable_vector_trace;
 +	int display_thinning_result;
 +
 +	//int SizeCompensate;
 +
 +	float depth_clamp;
 +	float depth_strength;
 +	float normal_clamp;
 +	float normal_strength;
 +
 +	float line_thickness;
 +
 +	int use_same_taper;
 +	float taper_left_distance;
 +	float taper_left_strength;
 +	float taper_right_distance;
 +	float taper_right_strength;
 +
 +	int enable_tip_extend;
 +	float extend_length;
 +
 +	int snake_sensitivity;
 +
 +	/* shared */
 +
 +	float contour_fade;          /* for dpix contour fading,reserved for future usage */
 +	float crease_threshold;      /* 0-1 range for cosine angle */
 +	float crease_fade_threshold; /* for dpix crease fading */
 +
 +	float line_color[4];
 +	float background_color[4];
 +
 +	float depth_width_influence;
 +	float depth_width_curve;
 +	float depth_alpha_influence;
 +	float depth_alpha_curve;
 +
 +	/* states (needs optimization) */
 +
 +	int reloaded;
 +
 +	/* offline render */
 +
 +	struct LANPR_RenderBuffer *render_buffer;      /* created when needed. for offline rendering */
 +	ListBase line_layers;                    /* now here!!! */
 +	struct LANPR_LineLayer    *active_layer;
 +
 +	int enable_intersections;
 +	int enable_chaining;
 +
 +} SceneLANPR;
 +
  /* *************************************************************** */
  /* Scene ID-Block */
  
@@@ -2236,27 -2196,28 +2261,28 @@@ typedef enum eGPencil_Selectmode_types 
  
  /* SceneEEVEE->flag */
  enum {
 -	SCE_EEVEE_VOLUMETRIC_ENABLED	= (1 << 0),
 -	SCE_EEVEE_VOLUMETRIC_LIGHTS		= (1 << 1),
 -	SCE_EEVEE_VOLUMETRIC_SHADOWS	= (1 << 2),
 +	SCE_EEVEE_VOLUMETRIC_ENABLED    = (1 << 0),
 +	SCE_EEVEE_VOLUMETRIC_LIGHTS     = (1 << 1),
 +	SCE_EEVEE_VOLUMETRIC_SHADOWS    = (1 << 2),
  //	SCE_EEVEE_VOLUMETRIC_COLORED	= (1 << 3), /* Unused */
 -	SCE_EEVEE_GTAO_ENABLED			= (1 << 4),
 -	SCE_EEVEE_GTAO_BENT_NORMALS		= (1 << 5),
 -	SCE_EEVEE_GTAO_BOUNCE			= (1 << 6),
 -	SCE_EEVEE_DOF_ENABLED			= (1 << 7),
 -	SCE_EEVEE_BLOOM_ENABLED			= (1 << 8),
 -	SCE_EEVEE_MOTION_BLUR_ENABLED	= (1 << 9),
 -	SCE_EEVEE_SHADOW_HIGH_BITDEPTH	= (1 << 10),
 -	SCE_EEVEE_TAA_REPROJECTION		= (1 << 11),
 -	SCE_EEVEE_SSS_ENABLED			= (1 << 12),
 -	SCE_EEVEE_SSS_SEPARATE_ALBEDO	= (1 << 13),
 -	SCE_EEVEE_SSR_ENABLED			= (1 << 14),
 -	SCE_EEVEE_SSR_REFRACTION		= (1 << 15),
 -	SCE_EEVEE_SSR_HALF_RESOLUTION	= (1 << 16),
 -	SCE_EEVEE_SHOW_IRRADIANCE		= (1 << 17),
 -	SCE_EEVEE_SHOW_CUBEMAPS			= (1 << 18),
 -	SCE_EEVEE_GI_AUTOBAKE			= (1 << 19),
 +	SCE_EEVEE_GTAO_ENABLED          = (1 << 4),
 +	SCE_EEVEE_GTAO_BENT_NORMALS     = (1 << 5),
 +	SCE_EEVEE_GTAO_BOUNCE           = (1 << 6),
 +	SCE_EEVEE_DOF_ENABLED           = (1 << 7),
 +	SCE_EEVEE_BLOOM_ENABLED         = (1 << 8),
 +	SCE_EEVEE_MOTION_BLUR_ENABLED   = (1 << 9),
 +	SCE_EEVEE_SHADOW_HIGH_BITDEPTH  = (1 << 10),
 +	SCE_EEVEE_TAA_REPROJECTION      = (1 << 11),
 +	SCE_EEVEE_SSS_ENABLED           = (1 << 12),
 +	SCE_EEVEE_SSS_SEPARATE_ALBEDO   = (1 << 13),
 +	SCE_EEVEE_SSR_ENABLED           = (1 << 14),
 +	SCE_EEVEE_SSR_REFRACTION        = (1 << 15),
 +	SCE_EEVEE_SSR_HALF_RESOLUTION   = (1 << 16),
 +	SCE_EEVEE_SHOW_IRRADIANCE       = (1 << 17),
 +	SCE_EEVEE_SHOW_CUBEMAPS         = (1 << 18),
 +	SCE_EEVEE_GI_AUTOBAKE           = (1 << 19),
  	SCE_EEVEE_SHADOW_SOFT			= (1 << 20),
+ 	SCE_EEVEE_OVERSCAN				= (1 << 21),
  };
  
  /* SceneEEVEE->shadow_method */
diff --cc source/blender/makesrna/intern/rna_scene.c
index 8f10b28ea8a,24889d97898..d4e4a01b4f4
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@@ -6074,264 -6037,25 +6095,281 @@@ static void rna_def_scene_eevee(Blender
  	RNA_def_property_boolean_default(prop, 0);
  	RNA_def_property_ui_text(prop, "Soft Shadows", "Randomize shadowmaps origin to create soft shadows");
  	RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+ 
+ 	/* Overscan */
+ 	prop = RNA_def_property(srna, "use_overscan", PROP_BOOLEAN, PROP_NONE);
+ 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_EEVEE_OVERSCAN);
+ 	RNA_def_property_boolean_default(prop, 0);
+ 	RNA_def_property_ui_text(prop, "Overscan", "Internally render past the image border to avoid "
+ 	                                           "screen-space effects disapearing");
+ 	RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+ 
+ 	prop = RNA_def_property(srna, "overscan_size", PROP_FLOAT, PROP_PERCENTAGE);
+ 	RNA_def_property_float_sdna(prop, NULL, "overscan");
+ 	RNA_def_property_float_default(prop, 3.0f);
+ 	RNA_def_property_ui_text(prop, "Overscan Size", "Percentage of render size to add as overscan to the "
+ 	                                                "internal render buffers");
+ 	RNA_def_property_range(prop, 0.0f, 50.0f);
+ 	RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 2);
+ 	RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
  }
  
 +static void rna_def_scene_lanpr(BlenderRNA *brna)
 +{
 +	StructRNA *srna;
 +	PropertyRNA *prop;
 +
 +	static const EnumPropertyItem DEBUG_rna_enum_lanpr_reload[] = {
 +		{0, "IDLE", 0, "Idle", "Idle"},
 +		{1, "RELOAD", 0, "RELOAD", "Force reload the scene"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static const EnumPropertyItem rna_enum_lanpr_master_mode[] = {
 +		{LANPR_MASTER_MODE_SOFTWARE, "SOFTWARE", 0, "Software", "Software edge calculation" },
 +		{LANPR_MASTER_MODE_DPIX, "DPIX", 0, "DPIX", "DPIX GPU edge calculation"},
 +		{LANPR_MASTER_MODE_SNAKE, "SNAKE", 0, "Snake", "Image filter and GPU tracing method"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static const EnumPropertyItem rna_enum_lanpr_enable_post_processing[] = {
 +		{LANPR_POST_PROCESSING_DISABLED, "DISABLED", 0, "Disabled", "LANPR does not compute anything"},
 +		{LANPR_POST_PROCESSING_ENABLED, "ENABLED", 0, "Enabled", "LANPR will compute feature lines in image post processing"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static const EnumPropertyItem rna_enum_lanpr_display_thinning_result[] = {
 +		{LANPR_POST_PROCESSING_DISABLED, "DISABLED", 0, "Edge Detection", "Display edge detector result"},
 +		{LANPR_POST_PROCESSING_ENABLED, "ENABLED", 0, "Thinning", "Apply thinning filters for vector usage"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static const EnumPropertyItem rna_enum_lanpr_use_same_taper[] = {
 +		{LANPR_USE_DIFFERENT_TAPER, "DISABLED", 0, "Different", "Use different taper value"},
 +		{LANPR_USE_SAME_TAPER, "ENABLED", 0, "Same", "Use same taper value for both sides of the line"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	static const EnumPropertyItem rna_enum_lanpr_enable_tip_extend[] = {
 +		{LANPR_DISABLE_TIP_EXTEND, "DISABLED", 0, "Disable", "Do not extend curve tips"},
 +		{LANPR_ENABLE_TIP_EXTEND, "ENABLED", 0, "Enable", "Extend curve tips to a user specified length"},
 +		{0, NULL, 0, NULL, NULL}
 +	};
 +
 +	srna = RNA_def_struct(brna, "SceneLANPR", NULL);
 +	RNA_def_struct_sdna(srna, "SceneLANPR");
 +	RNA_def_struct_ui_text(srna, "Scene LANPR Config", "LANPR global config");
 +
 +
 +	prop = RNA_def_property(srna, "reloaded", PROP_ENUM, PROP_NONE);
 +	RNA_def_property_enum_items(prop, DEBUG_rna_enum_lanpr_reload);
 +	RNA_def_property_enum_default(prop, 0);
 +	RNA_def_property_ui_text(prop, "Reload", "Reload the scene");
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +
 +	prop = RNA_def_property(srna, "master_mode", PROP_ENUM, PROP_NONE);
 +	RNA_def_property_enum_items(prop, rna_enum_lanpr_master_mode);
 +	RNA_def_property_enum_default(prop, LANPR_MASTER_MODE_DPIX);
 +	RNA_def_property_ui_text(prop, "Master Mode", "Choose calculation mode for NPR Line");
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "enable_vector_trace", PROP_ENUM, PROP_NONE);
 +	RNA_def_property_enum_items(prop, rna_enum_lanpr_enable_post_processing);
 +	RNA_def_property_enum_default(prop, LANPR_POST_PROCESSING_DISABLED);
 +	RNA_def_property_ui_text(prop, "Enable Post Processing", "Draw image post processing line or not");
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "display_thinning_result", PROP_ENUM, PROP_NONE);
 +	RNA_def_property_enum_items(prop, rna_enum_lanpr_display_thinning_result);
 +	RNA_def_property_enum_default(prop, LANPR_POST_PROCESSING_DISABLED);
 +	RNA_def_property_ui_text(prop, "Display", "Display mode");
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "depth_clamp", PROP_FLOAT, PROP_PERCENTAGE);
 +	RNA_def_property_float_default(prop, 0.001f);
 +	RNA_def_property_ui_text(prop, "Depth Clamp", "Depth clamp value for edge extraction");
 +	RNA_def_property_ui_range(prop, 0.0, 0.01, 0.0001, 5);
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "depth_strength", PROP_FLOAT, PROP_PERCENTAGE);
 +	RNA_def_property_float_default(prop, 800);
 +	RNA_def_property_ui_text(prop, "Depth Strength", "Depth strength value for edge extraction");
 +	RNA_def_property_ui_range(prop, 0, 1000, 10, 2);
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "normal_clamp", PROP_FLOAT, PROP_PERCENTAGE);
 +	RNA_def_property_float_default(prop, 2);
 +	RNA_def_property_ui_text(prop, "Normal Clamp", "Normal clamp value for edge extraction");
 +	RNA_def_property_ui_range(prop, 0, 5, 0.1, 2);
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_update(prop, NC_SCENE, NULL);
 +
 +	prop = RNA_def_property(srna, "normal_strength", PROP_FLOAT, PROP_PERCEN

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list