redner
redner copied to clipboard
Inconsistent formulation of SH_reconstruct
The formulations of SH_reconstruct for rectangular envmaps in pytorch and tensorflow are inconsistent in that the returned envmaps are of shape:
-
(res[0], res[1], coeffs.shape[0])
for pytorch -
(res[1], res[0], coeffs.shape[0])
for tensorflow
which one is the intended one?
also the pytorch one doesn't work in the first place because of this line:
https://github.com/BachiLi/redner/blob/master/pyredner/utils.py#L58-59
result = torch.max(result,
torch.zeros(res[1], res[0], coeffs.shape[0], device = coeffs.device))
where the indices for res
are wrong?
The last problem can be easily fixed (#166 ) however the original question still remains.