The TemplBeamProc Shader can be used to create very cheap fog light beam effects.
Create a 3D object with a back plane and 4 intersecting planes like this:
Create a texture (all faces share UVs) with the following contents:
It is only gray scale and has no alpha.
The TemplBeamProc Shader can handle fading out rendering faces, that are in a certain angle to the camera. It's best to use sub-materials for the different parts, because you can control the angle of visibility.
So the back plane gets 1 sub-material and the other planes get 1 sub-material.
These are the settings for the shader:
Shader Params | Description |
---|---|
ColorMultiplier | Increase/decrease brightness and blending. |
EndColor | Set the end color for gradient. |
EndRadius | Set the radius (in meters) of the effect at the end of the object. |
Length | Adjust the scaling of the rendered effect (like scaling of the actual mesh). |
OriginalLength | Scaling factor. If length and original length are the same, the object has scale of 100%. |
OriginalWidth | Same as above. |
Soft intersection factor | Controls softness of surface interaction with other opaque scene geometry. |
StartColor | Set the start color for gradient. |
StartRadius | Set the radius (in meters) of the effect at the start of the object. |
View dependency factor | Controls the blending in and out depending on the facing angle to the camera. |
Shader Gen Options | Description |
---|---|
Noise map | Gives a nice motion to the beams but cannot be controlled by any parameters. |
Muzzleflash | Option to be used for muzzle flash. |
Left: looking straight – until – Right: looking from bottom.
This effect is very cheap. Between 1 and 2 drawcalls, depending on how you set it up. Please make sure that this is only the fog light effect – a light still has to be placed.