FIXED: Brights dots in Environment Light PBR specular

@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!

1 Like

Thanks for the details, we’ll take a look

1 Like

Thanks for this. I haven’t seen that extra filtering before. The streaks actually go away when you are really making the lower mip levels due to their lower resolution not suffering from that high frequency noise, so the real mip chain works well as-is with your code. I’m still getting some hotspots when I convert this to work on cubemaps, but I expect I’ll put this improvement into 10k soon. Thanks for the investigation and sample!

Hi @malcolm I was literally thinking that after writing the last post in this thread. woohoo! Glad to hear, how soon can we expect the 10k to be avail? Is that the next experimental coming down the pipes?

Ah sorry, I meant the next 2021.10000 series, so it’ll go into official that comes up within a few weeks likely

1 Like

ohhh that’s amazing to hear. I’ll be putting that to good use! Thank you.

ok, fix is committed :slight_smile: Thanks again!

1 Like