Simple Physical Shader
This is a Physically Based Shader I wrote for use with the Free Version of Unity 4
From the Unity Asset Store Description:
Simple Physical Shader is a general-purpose physical shader that is intended for users who are new to Physically Based Rendering (PBR) and want a simple shader that can be mixed and matched with the Unity default shaders.
Simple Physical Shader works on Unity Free, on any devices that support Shader Model 3.0, and was developed to provide a usable PBR shader for projects that don't use HDR or linear lighting and for users who don't want to worry about baking out cubemaps. It uses maps that are human readable and easy to generate.
- Main Color
- Normal Map
- RSRM (radially symmetric reflectance map)
It also uses a generalized Light Wrap term that's used to fake subsurface scattering and ambient bounced light.
Main Color represents the general color of the object for that texel, just paint what you see -- even for metals.
Smoothness represents how rough or smooth the object is (white is smooth -- black is rough), it also determines how blurry reflections are.
Metallicity represents how much the object behaves like an ideal conductor vs an ideal dielectric. Dielectrics (black) refer to things like chalk, fabric, skin, and plastic -- objects with desaturated specular highlights and a significant fresnel reflection term. Conductors (white) refer to metals like gold, bismuth, copper. Partially metallic objects like water, oxidized aluminum, or multimaterial synthetics can be represented with gray values.
Normal Map does the same thing it normally does; offsets the normal of the pixel being lit.
RSRM is used as an ambient reflection for sky vs ground lighting. The left side of the texture is what is reflected on very smooth materials and the right side is for rougher materials. When authoring these, the left should have sharp contrast with a clear horizon and the right should be blurry with and average brightness equivalent to 50% gray. This map is tinted by the Unity Ambient Lighting term, so you shouldn't need to change this map during gameplay (unless you also change out the skybox).
I originally wrote this as a sort of experiment to help me wrap my head around Physically Based Rendering, and I hope it does the same for you. Feel free to experiment with it -- it's free for a reason.