Merge branch 'blender-v4.2-release'

This commit is contained in:
Harley Acheson
2024-06-20 10:31:13 -07:00
2 changed files with 6 additions and 1 deletions

View File

@@ -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)

View File

@@ -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);
}
}