About LightShape Shaders
Note: See bottom of page for Tutorials & Reference.
Note: These Shaders are NOT Required to use the LightShape Cubemap generator. They are merely a gift from Me to You!
If you already own LightShape, be sure to register by sending an email to cscherubini@gmail.com to receive update information.
A brief description of the shaders that are Included with LightShape.
Note: These Shaders work in Forward rendering just fine.
On Some Cards Deferred Rendering, using a Light with Shadow Maps, results in some bad artifacts. This is due to a bug in unity with #pragma glsl and using a Custom Lighting Model (even a direct copy from the standard one). If you want to use these shaders in Deferred Rendering with Shadow Maps, send bugs to Unity! 🙂
There are two shaders that I included with LightShape to show off your Cubemaps.
LightShape/LightSpread Shader & LightShape/LightMap Shader
They are both similar but with a few small differences.
Lets look at the LightSpread Shader.
Inspector:
Main Texture: Texture in Direct Light. The Alpha Channel is used for Self Illumination.
Dark Texture: Texture used in Shadow. Tip: Use an ambient occlusion pass of the Main Texture here. 🙂
Normal Map: Used for Bump Effect
Rimlight Ramp: Used for Fresnel Falloff of the Cubemap. Left to Right = Normals Away From Camera to Toward Camera.
Specular Color: Color Channels used for Specular & Cubemap Brightness. Alpha Channel Used for Pushing the Rimlight Ramp & Blurryness of Cubemap (If Cubemap has Mip Levels)
Main Brightness: Brighness of the Main Texture that is in Direct Light.
Cubemap Brightness: How Bright is the Cubemap
Specular Brightness: How Bright is the Specular contribution of the Direct Light. Does Not Effect Cubemap.
Light Spread: The Smoothness of the transition from direct to Indirect Light on the Surface.
Reflection Map: The Cubemap used on this shader.
The LightMap Shader.
Basically the same as the LightSpread Shader but without Main Brightness or LightSpread variables.
Also, the Lightmap on the model will Occlude Specular Highlights from the Direct Light.
Download the Example Scene & Shaders here for Free!
Other Info: