Page MenuHome

Blender Internal: Freestyle lines become unintentionally translucent when using full sample AA
Closed, ResolvedPublic

Description

System Information
Ubuntu 18.04

Blender Version
2.75-2.79b

Short description of error
Since v2.75, Blender Internal + Freestyle produces unintentional translucent strokes if full sample AA is enabled.

Exact steps for others to reproduce the error
Attached .blend file.

Workaround
I found that the first sample render of Freestyle is never merged into full sample image.

diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 97971030dfb..4f2f8d67f45 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2454,6 +2454,13 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree)
                                                BLI_rw_mutex_unlock(&re->resultmutex);
                                                render_result_uncrop(re1);
                                        }
+#ifdef WITH_FREESTYLE
+                                       else if (re1->r.mode & R_EDGE_FRS) {
+                                               BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);
+                                               composite_freestyle_renders(re1, 0);
+                                               BLI_rw_mutex_unlock(&re->resultmutex);
+                                       }
+#endif
                                        ntreeCompositTagRender(re1->scene); /* ensure node gets exec to put buffers on stack */
                                }
                        }

Though I'm not sure if this is correct solution, I can obtain desired result.