Sun Shafts image effect
The Sun Shafts image effect is a powerful technique to create radial light scattering such as god rays or light beams that are originating from a very bright light source.
As with the other image effects, this effect is only available in Unity Pro. Make sure to have the Pro Standard Assets installed.
Example for Sun Shafts.
Properties
Depth texture | This option can be used when no depth textures are available or too expensive to calculate (e.g. in forward rendering with plenty of objects). If this option is disabled it is required that the Sun Shafts effect is the very first image effect of a camera. |
Resolution | The used resolution. Lower resolutions are faster to calculate and create softer results. |
Sun Transform | The transform of the light source that casts the Sun Shafts. Only the position is important (see Radius). |
Distance and Align to viewport center | Place the Sun Transform along a ray from the center of the game view camera. |
Sun color | The tint color of the shafts. |
Radius | The radius that defines the area around the sun transform that can cast sun shafts. |
Blur offset | The length of the generated sun shafts. |
Blur iterations | The iterations for creating sun shafts. More iterations will generate smoother and longer light beams but are also more expensive to calculate. |
Intensity | The brightness of the added Sun Shafts. |
Use alpha mask | Defines how much the alpha channel of the color buffer should be used when generating Sun Shafts. This is useful e.g. when your skybox has a proper alpha channel that defines mask (such as clouds). |
Hardware support
Bloom and flares effect works only 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. Depth texture support is only required when the Use depth texture option is enabled.
Page last updated: 2010-09-09