bevy/crates/bevy_pbr
Elabajaba 94291cf569
Fix black spots appearing due to NANs when SSAO is enabled (#8926)
# Objective

Fixes https://github.com/bevyengine/bevy/issues/8925

## Solution

~~Clamp the bad values.~~

Normalize the prepass normals when we get them in the `prepass_normal()`
function.

## More Info

The issue is that NdotV is sometimes very slightly greater than 1 (maybe
FP rounding issues?), which caused `F_Schlick()` to return NANs in
`pow(1.0 - NdotV, 5.0)` (call stack looked like`pbr()` ->
`directional_light()` -> `Fd_Burley()` -> `F_Schlick()`)
2023-07-01 21:29:13 +00:00
..
src Fix black spots appearing due to NANs when SSAO is enabled (#8926) 2023-07-01 21:29:13 +00:00
Cargo.toml improve shader import model (#5703) 2023-06-27 00:29:22 +00:00