Specular Conductivity shader (WIP)

I really connected with the conductor | dielectric description of specularity in this article: so I decided to apply that principle to my first shader attempt.

I want to quickly adjust materials on simple models, without having to create a bunch of texture maps in Photoshop. These objects need to be read at a glance as plastic, metal, leather, etc. Unity’s default shaders can do this, but they still rely on textures and especially alpha-channels for specularity.

So I’ve broken specularity down into 3 sliders:

Specular Intensity: Adjust the overbright amount of the specular highlights. Overboosting isn’t technically correct, but it works well in this scenario.

Specular Power: Adjusts the size of the specular highlights.

Specular Conductivity: How much the base / diffuse colour of the object tints incoming light before bouncing. I’m overboosting this as well atm.

It’s pretty hacky right now. The incoming light is currently faked with a colour value, so I’ll have to put that in correctly. Plus it doesn’t account (yet) for optional texture maps. And I’d really like to do a cubemap-aware version. I wanted to share my work-in-progress though.

Here’s the source, written in Unity3D’s ShaderLab + Cg / HLSL. It’s pretty bare bones:

The dragon model you see here is the free one via Stanford’s scanned models.