Prepass normals lack precision
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version [a879f98](https://github.com/bevyengine/bevy/commit/a879f98d3b757fe19afb17b976b11f49119ab900)
The prepass normals appear to lack precision. Not sure if it's a limitation of the [prepass normals format](https://github.com/bevyengine/bevy/blob/main/crates/bevy_core_pipeline/src/prepass/mod.rs#L42), 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](https://gist.github.com/DGriffin91/502ab6b6baa3e2cfff3e85b85ae1019d) for images below. [Version for testing](https://gist.github.com/DGriffin91/232da7eca8cf819c1478cb3053cd5079) with [Deferred Rendering PR](https://github.com/bevyengine/bevy/pull/9258).
Normals without prepass:

Normals with prepass:

Normals using oct24 format from [Deferred Rendering PR](https://github.com/bevyengine/bevy/pull/9258)

Contributor guide
Assessment
This issue has not been assessed yet.