diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-02-11 20:48:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-02-12 17:01:29 +0300 |
commit | 9febda912b04559277d465b9610334c04a73d2ce (patch) | |
tree | ed64b83783214e4605924de6fd4ab28001a132d5 /source/blender/render/intern/engine.c | |
parent | 9fa6e06287dc49f1fcf2bbfa150c0ff368668fed (diff) |
Baking: support vertex color baking of normal material, UV discontinuities
Baking vertex colors per-corner leads to unwanted discontinuities when there is
sampling noise, for example in ambient occlusion or with a bevel shader node for
normals. For this reason the code used to always average results per-vertex.
However when using split normals, multiple materials or UV islands, we do want to
preserve discontinuities. So now bake per corner, but make sure the sampling seed
is shared for vertices.
Fix T85550: vertex color baking crash with split normals, Ref D10399
Fix T84663: vertex color baking blending at UV seams
Diffstat (limited to 'source/blender/render/intern/engine.c')
-rw-r--r-- | source/blender/render/intern/engine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/render/intern/engine.c b/source/blender/render/intern/engine.c index 151d994dddf..b199b1b0743 100644 --- a/source/blender/render/intern/engine.c +++ b/source/blender/render/intern/engine.c @@ -194,7 +194,7 @@ static RenderResult *render_result_from_bake(RenderEngine *engine, int x, int y, primitive[1] = int_as_float(-1); } else { - primitive[0] = int_as_float(bake_pixel->object_id); + primitive[0] = int_as_float(bake_pixel->seed); primitive[1] = int_as_float(bake_pixel->primitive_id); primitive[2] = bake_pixel->uv[0]; primitive[3] = bake_pixel->uv[1]; |