The ghosts are reflections of lens which are due to the treatment of surface of glass, in general a treatment anti relfet, but not being able to combine all on the same surface, the reflections are coloured.
The system works based on texture rendered in the direction reversed at the location of the flare on the screen through the center of it.
The simple version doesn't allow to manage the color of each ghost independently, and the number of ghosts is inifini, but it can have a big impact on the performance.
Here is an example of a simple ghost setting, which uses 8 instances, don't forget to use a texture with a correct compression and mipmap setting.
Ghost_NumberOfGhost : number of ghost instances to display
GhostTex2D : Texture to use for the ghost, recommended : 512x512 RGBA 16f HDR ( Texture Group Effect )
Ghost_Size : the size of the ghost uses a static list in the shader which can be multiplied by this value
Ghost_Offset : is the distance setting between each ghost , the list is also static but can be multiplied by this value .
Ghost_HorizontalPositionIntensity : Allows to change the intensity of the horizontal placement of ghosts, this allows to make ghost totally vertical.
Ghost_VerticalPositionIntensity : Allows to change the intensity of the vertical placement of ghosts, this allows to make ghosts totally horizontal.
Ghost_UV_Distortion_Radius : this value allows to make a distortion of the uv which allows to render the ghosts , this distortion uses a combination of radial gradient exposent which is composed with the basic uv , what allows to make a spherical distortion , this value is the size of the circle .
Ghost_UV_Distortion _Density : is the density of the gradient, which allows to intensify the spherical effect.
Ghost_UV_Distortion_Intensity : is a control value which allows to intensify the previous settings .
Ghost_ScreenMaskRadius : is a mask based on the plane of the billboard, and which allows to make a mask to avoid the cut on the edges of the plane, this value is the radius, 0 to 0.5
Ghost_ScreenMaskDensity : is the density of the mask which is a mask in radial gradient exposent .
Ghost_Tint : is simply the color setting that is multiplied to the texture
Ghost_OffsetStart : is the minimal value of the first ghost
Ghost_Boost : allows to boost the color intensity in the final render.
The ghost advanced use texture for the size, position and color of the ghosts, you can use any type of texture as long as it is not of a unique color.
For the random, the shader will read some pixel in the texture in a procedural way, this allows to change quickly the placement and color of the ghosts.
GhostAdvanced_Tex2DNoise : is the texture that will determine the size and position of each ghost, which will be multiplied with a basic list, only the red channel will be used
GhostAdvanced_Tex2DTint: is the texture that will be used to give color shades to the ghost, the RGB channel will be used, you can use a LUT for that, or a texture with your own color, it is recommended to use a texture of small size.
Ghost_Advanced_Tint_Intensity : increase the intensity of the color given by the texture.
GhostAdvanced_NoiseLerp : this value allows to change the base seed for the procedural, moving this value allows you to explore the values.
GhostAdvanced_NoiseOffset : relatively the same as the previous value.
Example of the use of advanced
Ghost Parametric is a new option that allows you to have control over each ghost display, but at the cost of lower performance.
It can be added or replace directly the basic ghost.
It can have a total of 8 parametric ghosts that can be added in groups of two.
Ghost advanced + ghost parametric configure in anamorphic .
Ghost Colorize allows you to colorize the ghost using a gradient texture or using 4 color values, this allows you to add color variation depending on the location of the ghost on the screen compared to the center of the lensflare.