Skip to content

Commit e54ac7e

Browse files
authored
add HALF to the output description when needed (#2012)
1 parent d935002 commit e54ac7e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<!-- SPDX-License-Identifier: Apache-2.0 -->
22
# Changelog
33

4+
## Pending next bugfix release
5+
- [usd#1989](https://github.com/Autodesk/arnold-usd/issues/1989) - Support mixed half/float channels when using the render delegate in batch mode with husk.
6+
7+
48
## Pending feature release
59

610
### Feature

libs/render_delegate/render_pass.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,7 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
895895
auto* enableFiltering = static_cast<bool*>(AiArrayMap(enableFilteringArray));
896896
auto* halfPrecisionArray = AiArrayAllocate(numRenderVars, 1, AI_TYPE_BOOLEAN);
897897
auto* halfPrecision = static_cast<bool*>(AiArrayMap(halfPrecisionArray));
898+
const bool isDeepExrDriver = AiNodeIs(customProduct.driver, str::driver_deepexr);
898899
for (const auto& renderVar : product.renderVars) {
899900
CustomRenderVar customRenderVar;
900901
*tolerance =
@@ -938,6 +939,9 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
938939
if (!renderVar.name.empty() && renderVar.name != renderVar.sourceName) {
939940
output += TfStringPrintf(" %s", renderVar.name.c_str());
940941
}
942+
if (arnoldTypes.isHalf && !isDeepExrDriver) {
943+
output += " HALF";
944+
}
941945
customRenderVar.output = AtString{output.c_str()};
942946
}
943947
tolerance += 1;
@@ -950,7 +954,7 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
950954
AiArrayUnmap(halfPrecisionArray);
951955

952956
// FIXME do we still need to do a special case for deep exr or should we generalize this ? #1422
953-
if (AiNodeIs(customProduct.driver, str::driver_deepexr)) {
957+
if (isDeepExrDriver) {
954958
AiNodeSetArray(customProduct.driver, str::layer_tolerance, toleranceArray);
955959
AiNodeSetArray(customProduct.driver, str::layer_enable_filtering, enableFilteringArray);
956960
AiNodeSetArray(customProduct.driver, str::layer_half_precision, halfPrecisionArray);

0 commit comments

Comments
 (0)