Merge branch 'blender-v3.1-release'

This commit is contained in:
Clément Foucault
2022-02-04 19:35:35 +01:00
8 changed files with 44 additions and 29 deletions

View File

@@ -244,7 +244,6 @@ void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *area)
for (region = area->regionbase.first; region; region = region->next) {
if ((region->regiontype == RGN_TYPE_WINDOW) && region->regiondata) {
ED_view3d_stop_render_preview(wm, region);
break;
}
}
}

View File

@@ -451,7 +451,9 @@ std::string GLShader::vertex_interface_declare(const ShaderCreateInfo &info) con
ss << "\n/* Inputs. */\n";
for (const ShaderCreateInfo::VertIn &attr : info.vertex_inputs_) {
if (GLContext::explicit_location_support) {
if (GLContext::explicit_location_support &&
/* Fix issue with amdgpu-pro + workbench_prepass_mesh_vert.glsl being quantized. */
GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_OFFICIAL) == false) {
ss << "layout(location = " << attr.index << ") ";
}
ss << "in " << to_string(attr.type) << " " << attr.name << ";\n";

View File

@@ -26,7 +26,7 @@ static void node_declare(NodeDeclarationBuilder &b)
b.add_input<decl::Geometry>(N_("Geometry"))
.supported_type({GEO_COMPONENT_TYPE_POINT_CLOUD, GEO_COMPONENT_TYPE_MESH});
b.add_input<decl::Bool>(N_("Selection")).default_value(true).hide_value().supports_field();
b.add_input<decl::Float>(N_("Distance")).default_value(0.1f).min(0.0f).subtype(PROP_DISTANCE);
b.add_input<decl::Float>(N_("Distance")).default_value(0.001f).min(0.0f).subtype(PROP_DISTANCE);
b.add_output<decl::Geometry>(N_("Geometry"));
}

View File

@@ -512,9 +512,9 @@ static TriTessFace *mesh_calc_tri_tessface(Mesh *me, bool tangent, Mesh *me_eval
triangles[i].mverts[0] = &mvert[me->mloop[lt->tri[0]].v];
triangles[i].mverts[1] = &mvert[me->mloop[lt->tri[1]].v];
triangles[i].mverts[2] = &mvert[me->mloop[lt->tri[2]].v];
triangles[i].vert_normals[0] = &vert_normals[me->mloop[lt->tri[0]].v][0];
triangles[i].vert_normals[1] = &vert_normals[me->mloop[lt->tri[1]].v][1];
triangles[i].vert_normals[2] = &vert_normals[me->mloop[lt->tri[2]].v][2];
triangles[i].vert_normals[0] = vert_normals[me->mloop[lt->tri[0]].v];
triangles[i].vert_normals[1] = vert_normals[me->mloop[lt->tri[1]].v];
triangles[i].vert_normals[2] = vert_normals[me->mloop[lt->tri[2]].v];
triangles[i].is_smooth = (mp->flag & ME_SMOOTH) != 0;
if (tangent) {