<p>I'll point out that even if you did implement it correctly, at 1 sample per pixel with low roughness materials you'll still see heavy specular aliasing. It's not uncommon to see the firefly pattern on edges on low roughness materials.</p>
<p>For reference see the Infiltrator demo without TAA</p>
<blockquote>
<p><a href="http://advances.realtimerendering.com/s2014/epic/TemporalAA_Compare.mov" rel="nofollow noreferrer">http://advances.realtimerendering.com/s2014/epic/TemporalAA_Compare.mov</a></p>
<p><a href="http://advances.realtimerendering.com/s2014/index.html#_HIGH-QUALITY_TEMPORAL_SUPERSAMPLING" rel="nofollow noreferrer">http://advances.realtimerendering.com/s2014/index.html#_HIGH-QUALITY_TEMPORAL_SUPERSAMPLING</a></p>
</blockquote>

CC BY-SA 4.0
2019-04-19T05:15:13.187Z
You might also check out [LEAN Mapping](http://www.cse.chalmers.se/edu/year/2011/course/TDA361/Advanced%20Computer%20Graphics/LEANpres.pdf).
user1118321
CC BY-SA 4.0
2018-11-18T09:14:21.967Z
2018-11-18T09:14:21.967Z
2020-06-18T08:32:12.800Z
Calvin
<p>I have been following <a href="https://learnopengl.com/" rel="nofollow noreferrer">LearnOpenGL.com</a>'s tutorials on PBR. Everything makes sense and I wrote up a shader for my physically based renderer.</p>

<p>I noticed that the results look great, however all of my metal objects have such a strong specular on the edges thanks to my Fresnel calculation, and it is producing specular aliasing.</p>

<p>See image:</p>

<p><a href="https://i.sstatic.net/Rreid.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Bnvvf.png" alt="Illustration of shading aliasing"></a></p>

<p>I can't seem to figure out why, or how to fix this. I also uploaded a simplified version of my PBR fragment shader. If someone could take a look, I would really appreciate it.</p>

<p>Simplified PBR fragment shader: <a href="https://textuploader.com/dv3h1" rel="nofollow noreferrer">https://textuploader.com/dv3h1</a></p>

<p>Here is the tutorial I am following: <a href="https://learnopengl.com/PBR/Lighting" rel="nofollow noreferrer">https://learnopengl.com/PBR/Lighting</a>
It doesn't seem to have any of these specular aliasing issues.</p>

<p>Thanks!</p>

CC BY-SA 4.0
2018-09-26T02:12:17.823Z
Can you create an none textured specular-only and fresnel-only image to help visualise were the problem is ?
PaulHK
CC BY-SA 4.0
2018-09-30T18:11:53.217Z
This PBR code contains many calculations prone to math errors like division by zero which cause undefined behaviour, i'd check that first and add some margin to prevent this like `max(1e-5, something)`. I actually implemented this tutorial some time ago and did some corrections.
mdkdy
<physically-based><specular>
PBR and Specular Aliasing
Brady Jessup
# PBR and Specular Aliasing

(Asked by: username_0 on 2018-09-25)

I have been following [LearnOpenGL.com](https://learnopengl.com/)'s tutorials on PBR. Everything makes sense and I wrote up a shader for my physically based renderer.

I noticed that the results look great, however all of my metal objects have such a strong specular on the edges thanks to my Fresnel calculation, and it is producing specular aliasing.

See image:

[![Illustration of shading aliasing](https://i.sstatic.net/Bnvvf.png)](https://i.sstatic.net/Rreid.jpg)

I can't seem to figure out why, or how to fix this. I also uploaded a simplified version of my PBR fragment shader. If someone could take a look, I would really appreciate it.

Simplified PBR fragment shader: <https://textuploader.com/dv3h1>

Here is the tutorial I am following: <https://learnopengl.com/PBR/Lighting>
It doesn't seem to have any of these specular aliasing issues.

Thanks!

**Tags:** physically-based, specular

> **Comments:**
> **username_1**: Can you create an none textured specular-only and fresnel-only image to help visualise were the problem is ?  
> **username_2**: This PBR code contains many calculations prone to math errors like division by zero which cause undefined behaviour, i'd check that first and add some margin to prevent this like `max(1e-5, something)`. I actually implemented this tutorial some time ago and did some corrections.  

---

## 1 answers

### Answer by username_3 on 2018-11-18. Score: 1

I'll point out that even if you did implement it correctly, at 1 sample per pixel with low roughness materials you'll still see heavy specular aliasing. It's not uncommon to see the firefly pattern on edges on low roughness materials.

For reference see the Infiltrator demo without TAA

> <http://advances.realtimerendering.com/s2014/epic/TemporalAA_Compare.mov>
>
> <http://advances.realtimerendering.com/s2014/index.html#_HIGH-QUALITY_TEMPORAL_SUPERSAMPLING>

> **Comments:**
> **username_4**: You might also check out [LEAN Mapping](http://www.cse.chalmers.se/edu/year/2011/course/TDA361/Advanced%20Computer%20Graphics/LEANpres.pdf).  

---

