Hello everyone!
I’m working in a VR project in 2019.2.2f1 using LWRP 6.9.1. The scenes in the project consist of objects with a lot of specular highlights, as well as relatively thin, rounded geometry (pipes, railing, etc.). As you can imagine, this is causing a lot of specular aliasing. In my research, I’ve come across a technique called Geometric Specular Aliasing, discussed in a GDC presentation by Valve (page 43).
I’ve also come across custom implementations of this process ( such as this one by bgolus ), as well as the built in implementation in the HDRP. I tested some of my models with these implementations in a separate project, and the results are exactly what I need. Unfortunately, my project is built in the LWRP, so these exact implementations don’t work for me. I took a shot at implementing it in the LWRP myself, but had no luck as I’m still fairly new to shader code. Has anyone managed to accomplish this technique in the LWRP? Any insight is greatly appreciated.
You can implement this in a shader graph. All the nodes you need should be available though it may be cleaner/easier to write a custom function node that takes in your world normal and smoothness, and outputs the modified smoothness directly. I don’t use shader graph much, or at all, so there may be some hidden gotchas to look out for, but the shader code itself is pretty straight-forward so I would expect it to work without too much fuss.