main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
3 changed files with 14 additions and 8 deletions
Showing only changes of commit 0fe1a02055 - Show all commits

View File

@ -181,10 +181,10 @@ void main()
/* Enlarge edge for flag display. */ /* Enlarge edge for flag display. */
half_size += (geometry_out.finalColorOuter.a > 0.0) ? max(sizeEdge, 1.0) : 0.0; half_size += (geometry_out.finalColorOuter.a > 0.0) ? max(sizeEdge, 1.0) : 0.0;
#ifdef USE_SMOOTH_WIRE if (do_smooth_wire) {
/* Add 1 px for AA */ /* Add 1 px for AA */
half_size += 0.5; half_size += 0.5;
#endif }
vec3 edge_ofs = vec3(half_size * sizeViewportInv, 0.0); vec3 edge_ofs = vec3(half_size * sizeViewportInv, 0.0);

View File

@ -322,7 +322,7 @@ static void duplicate_curves(GeometrySet &geometry_set,
int dst_curves_num = 0; int dst_curves_num = 0;
int dst_points_num = 0; int dst_points_num = 0;
for (const int i_curve : selection.index_range()) { for (const int i_curve : selection.index_range()) {
const int count = std::max(counts[selection[i_curve]], 0); const int count = counts[selection[i_curve]];
curve_offset_data[i_curve] = dst_curves_num; curve_offset_data[i_curve] = dst_curves_num;
point_offset_data[i_curve] = dst_points_num; point_offset_data[i_curve] = dst_points_num;
dst_curves_num += count; dst_curves_num += count;
@ -498,7 +498,7 @@ static void duplicate_faces(GeometrySet &geometry_set,
int total_loops = 0; int total_loops = 0;
Array<int> offset_data(selection.size() + 1); Array<int> offset_data(selection.size() + 1);
for (const int i_selection : selection.index_range()) { for (const int i_selection : selection.index_range()) {
const int count = std::max(counts[selection[i_selection]], 0); const int count = counts[selection[i_selection]];
offset_data[i_selection] = total_polys; offset_data[i_selection] = total_polys;
total_polys += count; total_polys += count;
total_loops += count * polys[selection[i_selection]].totloop; total_loops += count * polys[selection[i_selection]].totloop;
@ -1042,7 +1042,13 @@ static void node_geo_exec(GeoNodeExecParams params)
const NodeGeometryDuplicateElements &storage = node_storage(params.node()); const NodeGeometryDuplicateElements &storage = node_storage(params.node());
const eAttrDomain duplicate_domain = eAttrDomain(storage.domain); const eAttrDomain duplicate_domain = eAttrDomain(storage.domain);
Field<int> count_field = params.extract_input<Field<int>>("Amount"); static auto max_zero_fn = mf::build::SI1_SO<int, int>(
"max_zero",
[](int value) { return std::max(0, value); },
mf::build::exec_presets::AllSpanOrSingle());
Field<int> count_field(
FieldOperation::Create(max_zero_fn, {params.extract_input<Field<int>>("Amount")}));
Field<bool> selection_field = params.extract_input<Field<bool>>("Selection"); Field<bool> selection_field = params.extract_input<Field<bool>>("Selection");
IndexAttributes attribute_outputs; IndexAttributes attribute_outputs;
attribute_outputs.duplicate_index = params.get_output_anonymous_attribute_id_if_needed( attribute_outputs.duplicate_index = params.get_output_anonymous_attribute_id_if_needed(

View File

@ -529,7 +529,7 @@ static void sequencer_preprocess_transform_crop(
break; break;
case SEQ_TRANSFORM_FILTER_NEAREST_3x3: case SEQ_TRANSFORM_FILTER_NEAREST_3x3:
filter = IMB_FILTER_NEAREST; filter = IMB_FILTER_NEAREST;
num_subsamples = context->for_render ? 3 : 1; num_subsamples = 3;
break; break;
} }