✦ extending built-in pipeline with additional Disney BRDF features like anisotropy, clear coat, thin film, and subsurface scattering.
The idea for this rather experimental project first appeared when I stumbled upon an old but gold article by Kostas Anagnostou, in which the Unity Engine is described from the perspective of shader prototyping. As someone whose first shader endeavors began with Nvidia FX Composer, I was quite intrigued to see Unity being used in such an unorthodox way. By that time, I was already familiar with both the built-in and SRP pipelines that Unity provides, and had done some work with HLSL; however, I had never considered creating anything complex. I know it’s commonplace to think of Cg as outdated shading language, but as long as it's still accessible within the engine, there's always a way to make use of its functionality. So, I decided to write a shader from the ground up, starting with an unlit template, to see how far I could go with that.
Here's an example of the same shader, but with some additional functionality. I've used Voronoi noise to imitate that speckled, glittery-type effect typically seen in car paint flakes. You can see how it shimmers with the standard Unity bloom post-effect applied on top of it.
After finishing the main BRDF shader, I was left with a bunch of extra 'include files'. So I felt a bit fancy and decided to try recreating some of my favorite OSL shaders from the Redshift library: Marble, MatCap, and Flow Noise.