Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix black spots appearing due to NANs when SSAO is enabled (#8926)
# Objective Fixes #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()`)
- Loading branch information