@malcolm I posted about this in another bug thread regarding the environment light seam that you fixed some time ago, but wanted to return to the issue of the sparkles, or bright dots, that appear in the specular layer of PBR materials.
To resurface the old issue first:
As you can see with roughness values above 0, these sparkles start to appear clustered around the hot spots of the environment.
As you pointed out before, this particular HDRI map has some probably way to hot spots that exacerbate this issue:
However, even with more tame maps, the problem is quite bad. Here’s one that peaks at around ~1000
Here’s a very mild one that peaks out around 40:
While coming down to 40 looks better, there’s still enough artifacting that it actually causes the vast majority of roughness values to just look wrong, ie smoother but reflecting patterns.
Clamping bright parts of the HDRI helps but also affect the overall dynamic levels of the lighting and make things look more flat, and dull.
Anyways, I have been doing some research on the topic lately again and came across a few pieces of info I have not before, this learn openGL link must have been updated because I definitely read through it before today and didn’t see this part:
Specular IBL article
Specular IBL github code
They propose a solution that involves sampling from the source HDR environment texture at different mip map levels:
I was able to implement something along these lines that was a big improvement, but still not perfect below on the left:
There’s still these weird striations / streaks that change in intensity depending on some hard coded resolution variable inside the shader.
I’ve included this experiment in this toe file.
Any ideas on a solution, or any insight on what my still be wrong with my implementation of it?
Thanks!