Merge branch 'blender-v4.2-release'
This commit is contained in:
@@ -38,8 +38,12 @@ float sample_weight_get(vec3 center_N, vec3 center_P, ivec2 center_texel, ivec2
|
||||
/* TODO(fclem): Scene parameter. 10000.0 is dependent on scene scale. */
|
||||
float depth_weight = filter_planar_weight(center_N, center_P, sample_P, 10000.0);
|
||||
float normal_weight = filter_angle_weight(center_N, sample_N);
|
||||
/* Some pixels might have no correct weight (depth & normal weights being very small).
|
||||
* To avoid them have invalid energy (because of float precision),
|
||||
* we weight all valid samples by a very small amount. */
|
||||
float epsilon_weight = 1e-4;
|
||||
|
||||
return depth_weight * normal_weight;
|
||||
return max(epsilon_weight, depth_weight * normal_weight);
|
||||
}
|
||||
|
||||
SphericalHarmonicL1 load_spherical_harmonic(ivec2 texel, bool valid)
|
||||
|
||||
@@ -371,6 +371,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
else {
|
||||
MEM_freeN(path);
|
||||
path = BLI_strdup(BKE_appdir_folder_default_or_root());
|
||||
BLI_path_slash_ensure(path, FILE_MAXDIR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user