This is related to previous research from #59. Quick recap you could get INF values from point light at certain conditions. Such single value destroys whole HDR pipeline.
[2024/06/12] The dude with Discord's nickname Suslik told about another approach to avoid INF values. The idea is to clamp input values:
there's 3 ways it can break: D() goes to infinity, NoV goes to 0 and NoL goes to 0. each of them corresponds to a different mode of failure and needs to be taken care of separately
D() breaks when your roughness reaches 0. solution: never allow roughness to go below eps. use an actual mirror BRDF for mirrors if you have to. NoV and NoL can be safely clamped to be greater than eps as well, because they basically correspond to a grazing view angle and a grazing light angles respectively
For asset roughness he told about Diablo 4 approach which clamps this value to 0.2. But he pointed out that
also 0.2 is a crazy high value that will result in all blood looking dry. blizzard did it because of specular aliasing. you can clamp to a much lower value if your goal is to just get rid of infinities (something like 1e-2 should work for nonlinear roughness)
So it's needed to try this approach.
Steps
[x] Make reference scene for comparison
[x] Implement clamping
[x] Tweak roughness clamping value and select best value
This is related to previous research from #59. Quick recap you could get
INF
values from point light at certain conditions. Such single value destroys whole HDR pipeline.[2024/06/12] The dude with Discord's nickname Suslik told about another approach to avoid
INF
values. The idea is to clamp input values:For asset roughness he told about Diablo 4 approach which clamps this value to 0.2. But he pointed out that
So it's needed to try this approach.
Steps