Glow image effect
Glow (sometimes called "Bloom") can dramatically enhance the rendered image by making overbright parts "glow" (e.g. sun, light sources, strong highlights). The Bloom and Flares effect is a more complex and powerful but also more expensive version of the Glow effect.
Unity includes a Glow image postprocessing effect, and all built-in shaders are made to support it nicely. Like all image effects, Glow is available in Unity Pro only. Make sure to have the Pro Standard Assets installed.
Glow effect applied to the scene
Properties
Glow Intensity | Total brightness at the brightest spots of the glowing areas. |
Blur Iterations | Number of times the glow is blurred when being drawn. |
Blur Spread | Multiple of the glow's residual reach. |
Glow Tint | Color tint applied to the visible glow. |
Downsample Shader | The shader used for the glow. You generally should not have to change this. |
Details
Glow uses the alpha channel of the final image to represent "color brightness". All colors are treated as RGB, multiplied by the alpha channel. You can view the contents of the alpha channel in Scene View.
All built-in shaders write the following information to alpha:
- Main texture's alpha multiplied by main color's alpha (not affected by lighting).
- Specular shaders add specular highlight multiplied by specular color's alpha.
- Transparent shaders do not modify alpha channel at all.
- Particle shaders do not modify alpha channel, except for Particles/Multiply which darkens anything that is in alpha.
- Skybox shaders write alpha of the texture multiplied by tint alpha
Most of the time you'll want to do this to get reasonable glow:
- Set material's main color alpha to zero or use a texture with zero alpha channel. In the latter case, you can put non-zero alpha in the texture to cause these parts to glow.
- Set the specular color alpha for Specular shaders to be 100%.
- Keep in mind what alpha the camera clears to (if it clears to a solid color), or what alpha the skybox material uses.
- Add the Glow image effect to the camera. Tweak Glow Intensity and Blur Iterations values, you can also take a look at the comments in the shader script source.
- The alpha channel on the Skybox can be used to great effect to add more glow when looking at the sun
Tips:
- Use the alpha rendering mode in the scene view toolbar to quickly see which objects output different values to the alpha channel.
Hardware support
Glow works on graphics cards with support for pixel shaders (2.0) or devices with OpenGL ES2.0 support. Eg. GeForce FX 5200 or Radeon 9500 and up. All image effects automatically disable themselves when they can not run on an end-users graphics card.
Page last updated: 2010-09-09