Select your camera and select "Glow 11" in the Component menu or use the "Add Component" button in the inspector.
For mobile targets it's recommended to enable "Use 32-bit Display Buffer" in PlayerSettings.
Activating this option will activate an alternate rendering mode which will reuse the depth buffer from the normal rendering pass for the glow rendering. Which mode is faster depends on the actual scene that is rendered.
This mode is not compatible with anti aliasing.
Glow 11 currently supports 3 different blur modes.
Depending on the selected Blur Mode there will be different options to control the blur.
The blend mode defines how the glow is blended into the scene.
Texture that can be used as a Glow source.
Color that can be used as a Glow source.
The glow source defines what texture/color is used for the glow. Depending on the actual Material the following options are possible.
The glow can be multiplied by textures or colors. Depending on the actual Material the following options are possible.
If you want to modify existing shaders to support glow just follow the following steps.
_GlowTex ("Glow", 2D) = "" {} _GlowColor ("Glow Color", Color) = (1,1,1,1) _GlowStrength ("Glow Strength", Float) = 1.0
Depending on the shader you need to add one of the following tags to the shader.
Tags { "RenderType"="Glow11" "RenderEffect"="Glow11" }
Tags { "RenderType"="Glow11Transparent" "RenderEffect"="Glow11Transparent" }
Tags { "RenderType"="Glow11TransparentCutout" "RenderEffect"="Glow11TransparentCutout" }
CustomEditor "GlowMatInspector"
Every glow settings that can be made on the camera can also be done programatically at runtime.
Name | Type |
---|---|
reuseDepth | bool |
blurMode | Glow11.BlurMode |
settings | Glow11.Settings |
Name | Type | Affected Blur Mode | ||
---|---|---|---|---|
Default | HighQuality | UniyBlur | ||
downsampleSteps | int | X | ||
iterations | int | X | X | |
blurSpread | float | X | ||
innerStrength | float | X | X | X |
outerStrength | float | X | ||
boostStrength | float | X | X | X |
blendMode | Glow11.BlendMode | X | X | X |
Possible values:
Possible values:
using UnityEngine; using System.Collections; public class AnimateOuterStrength : MonoBehaviour { private Glow11.Glow11 glow; void Start () { glow = Camera.main.GetComponent<Glow11.Glow11>(); glow.blurMode = Glow11.BlurMode.Default; } void Update () { glow.settings.outerStrength = Mathf.Abs(Mathf.Sin(Time.timeSinceLevelLoad)); } }