@IvanKobzarev Thanks for the turnaround and fix! That does seem to be the change I implemented on my end to get it working. I’ll have to test this change out from nightly snapshot some time.
I have another issue that I think I had fixed on my end as well. When the image gets particularly dark or bright, I would see errant splotches of color. I think I see the artifacts on your image on the pull request as well, around the shadows in the right leg and the chair rest.
On my end, I had this issue fixed by wrapping the clamp0255 macro in parenthesis. E.g:
#define clamp0255(x) (x > 255 ? 255 : x < 0 ? 0 : x)

I think in this context:
outData[wr++] = (clamp0255(ri) - normMeanRm255) / normStdRm255;

The way the macro expands and the precedence of the ternary operator, I think that if ri clips below 0 or over 255, it doesn’t actually get subtracted by normMeanRm255.