Closed najadojo closed 5 years ago
Incorrect results are being produced from the NRM packing. The current algorithm does a simple value copy but to maintain comparative visual equality we need to renormalize the normal values and also compute roughness from normal variance.
Repro steps: Input Normal texture:
Input Metallic Roughness texture:
Expected NRM texture:
Actual NRM texture:
Incorrect results are being produced from the NRM packing. The current algorithm does a simple value copy but to maintain comparative visual equality we need to renormalize the normal values and also compute roughness from normal variance.
Repro steps: Input Normal texture:![input_normal](https://user-images.githubusercontent.com/17411617/51198052-04772400-18a8-11e9-95c1-b76e9f2a4d0c.png)
Input Metallic Roughness texture:![input-mr](https://user-images.githubusercontent.com/17411617/51198042-fcb77f80-18a7-11e9-885a-c9dbd449c7c1.jpg)
Expected NRM texture:![correct-nrm](https://user-images.githubusercontent.com/17411617/51197834-6edb9480-18a7-11e9-90a6-d2ca80f13623.png)
Actual NRM texture:![packing_nrm_0](https://user-images.githubusercontent.com/17411617/51197872-86b31880-18a7-11e9-85d0-a6632725fdea.png)