diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-13 00:15:22 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-13 00:15:22 +0400 |
commit | 99e97afbe398fe44ceae6a85039a80c32b5a4606 (patch) | |
tree | 8c934c3e95966d016000f43891d3908bd0ec27c7 /source/blender | |
parent | 50262b5ea9f107930c0f08913d0de307c4edecc0 (diff) |
Fix #35586: add an option to the Z Combine compositing node to disable the Z
buffer antialiasing that was restored in 2.67 after it was missing in the new
compositor implementation.
This option tends to make results worse rather then better for Cycles renders,
but is useful for Blender internal. Their Z-buffers look quite different for
antialiasing, and I'd rather not change either.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/compositor/nodes/COM_ZCombineNode.cpp | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 5 |
3 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp index 95f06e350b1..b48d974e893 100644 --- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp +++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp @@ -34,7 +34,7 @@ void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContext *context) { - if (context->getRenderData()->scemode & R_FULL_SAMPLE) { + if ((context->getRenderData()->scemode & R_FULL_SAMPLE) || this->getbNode()->custom2) { if (this->getOutputSocket(0)->isConnected()) { ZCombineOperation *operation = NULL; if (this->getbNode()->custom1) { diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index d39695f54b7..cbf40bf2e57 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1379,6 +1379,7 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), P col = uiLayoutColumn(layout, TRUE); uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE); + uiItemR(col, ptr, "use_antialias_z", 0, NULL, ICON_NONE); } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 4040f7f68c5..0c31f042f93 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -5148,6 +5148,11 @@ static void def_cmp_zcombine(StructRNA *srna) RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0); RNA_def_property_ui_text(prop, "Use Alpha", "Take Alpha channel into account when doing the Z operation"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); + + prop = RNA_def_property(srna, "use_antialias_z", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "custom2", 0); + RNA_def_property_ui_text(prop, "Anti-Alias Z", "Anti-alias the z-buffer to try to avoid artifacts, mostly useful for Blender renders"); + RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } static void def_cmp_ycc(StructRNA *srna) |