redner icon indicating copy to clipboard operation
redner copied to clipboard

Inconsistent formulation of SH_reconstruct

Open cosw0t opened this issue 3 years ago • 0 comments

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.

cosw0t avatar Jul 05 '21 17:07 cosw0t