Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-02-24 21:40:42 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-02-24 21:40:42 +0300
commit9de720f31aaa5081dcdd62eee29e67f865d340fc (patch)
treefea7b16a8f830de116aa9dc67cdf94e1f2df0a27 /source/blender/editors/object/object_bake_api.c
parent8fb7c50aabdf79d7c0f72a43c624cbbabbe146a7 (diff)
parent0781c22ceedc6700a073c620723270d32b2f2852 (diff)
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r--source/blender/editors/object/object_bake_api.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 8cbe1cf5595..7f4af43eb30 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -1038,19 +1038,18 @@ static void bake_targets_populate_pixels_vertex_colors(BakeTargets *targets,
* materials and UVs. */
pixel->seed = v;
- /* Barycentric coordinates, nudged a bit to avoid precision issues that
- * may happen when exactly at the vertex coordinate. */
+ /* Barycentric coordinates. */
if (j == 0) {
- pixel->uv[0] = 1.0f - FLT_EPSILON;
- pixel->uv[1] = FLT_EPSILON / 2.0f;
+ pixel->uv[0] = 1.0f;
+ pixel->uv[1] = 0.0f;
}
else if (j == 1) {
- pixel->uv[0] = FLT_EPSILON / 2.0f;
- pixel->uv[1] = 1.0f - FLT_EPSILON;
+ pixel->uv[0] = 0.0f;
+ pixel->uv[1] = 1.0f;
}
else if (j == 2) {
- pixel->uv[0] = FLT_EPSILON / 2.0f;
- pixel->uv[1] = FLT_EPSILON / 2.0f;
+ pixel->uv[0] = 0.0f;
+ pixel->uv[1] = 0.0f;
}
}
}