diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-19 14:00:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-19 14:34:11 +0300 |
commit | 9d796df4f6376809f14ca0dd0484f63df9c72494 (patch) | |
tree | 2a01240bcdd82af1bc6c1507f41abf5df20c95a7 /source/blender/compositor/nodes | |
parent | 0d3555fe2ea39e896a4679598723add20609f0c8 (diff) |
Support half float file format storage for Multilayer EXR
Quite straightforward implementation -- all the conversion magic is
happening in IMB_exr_write_channels() and remained changes are only
needed to pass information whether channels is to be converted to
half float or not.
Regular file output will use full-float for Z pass, which matches
behavior of the single layer EXR files. But when saving happens
with File Output node then all the passes are respecting half float
settings because it's not possible to distinguish whether we're
saving Z pass or not.
Reviewers: juicyfruit, campbellbarton
Reviewed By: campbellbarton
Subscribers: maxon, effstops, fsiddi
Differential Revision: https://developer.blender.org/D1353
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_OutputFileNode.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp index acd2602e216..42805d1ff37 100644 --- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp +++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp @@ -47,18 +47,21 @@ void OutputFileNode::convertToOperations(NodeConverter &converter, const Composi */ return; } - + if (storage->format.imtype == R_IMF_IMTYPE_MULTILAYER) { + const bool use_half_float = (storage->format.depth == R_IMF_CHAN_DEPTH_16); /* single output operation for the multilayer file */ OutputOpenExrMultiLayerOperation *outputOperation; if (is_multiview && storage->format.views_format == R_IMF_VIEWS_MULTIVIEW) { outputOperation = new OutputOpenExrMultiLayerMultiViewOperation( - context.getRenderData(), context.getbNodeTree(), storage->base_path, storage->format.exr_codec, context.getViewName()); + context.getRenderData(), context.getbNodeTree(), storage->base_path, + storage->format.exr_codec, use_half_float, context.getViewName()); } else { outputOperation = new OutputOpenExrMultiLayerOperation( - context.getRenderData(), context.getbNodeTree(), storage->base_path, storage->format.exr_codec, context.getViewName()); + context.getRenderData(), context.getbNodeTree(), storage->base_path, + storage->format.exr_codec, use_half_float, context.getViewName()); } converter.addOperation(outputOperation); |