Open DGriffin91 opened 1 year ago
Any reason we don't just oct24 encode the prepass normals?
Not that I know of. Seems like it should work nicely. Depending on the texture format I guess it's likely that we'll have 32 bits so we'd have some left over or we could just use oct32.
Bevy version a879f98
The prepass normals appear to lack precision. Not sure if it's a limitation of the prepass normals format, or something else.
This is a helpful paper regarding formats for normals: https://jcgt.org/published/0003/02/01/paper.pdf Unfortunately, it doesn't have an image of RGB10A2, but in a table it does list snorm10×3, which may be similar.
Test scene for images below. Version for testing with Deferred Rendering PR.
Normals without prepass:
Normals with prepass:
Normals using oct24 format from Deferred Rendering PR