Options
Pulse Edge Color
The color of the pulse's edge.
Pulse Center
The center point of the pulse relative to the screen. Only the x- and y-coordinates are used. Setting x and y to 0.5 starts the pulse in the center of the screen, 0 starts the pulse in the bottom-left corner of the screen, and 1.0 starts the pulse in the top-right corner of the screen.Values below 0 or above 1 make the effect originate outside of the screen, and can thus render it invisible.
If you would like for the pulse to originate from a certain game object in the scene, you would need to convert
the object's world coordinates to camera viewport coordinates (i.e. screen coordinates) and dynamically set the shader's
pulse center. Please read
the API
for detailed information on how to do that.
Pulse Length
The duration of the pulse effect in seconds.
The duration is defined as the time it takes for
the controller value
to reach 1, starting from 0.
Pulse Strength
The strength of the pulse's distortion. Set to 0 for no distortion/warp effect. Negative values reverse the distortion (convex distortion turns into concave, and vice versa). Values between -1 and 1 are recommended.
Pulse Edge Thickness
The thickness (width) of the pulse's edge. Setting this to 0 renders the pulse invisible. Recommended values are between 0 and 1. Negative values cause unpredictable behaviour.
Please bear in mind that setting the edge thickness to large values may result
in the pulse not completely dissipating, i.e. not fully leaving the screen. For large pulse edges, either increase the pulse length,
or increase the stretch value in order to ensure the pulse completely leaves the screen.
Stretch
Since the pulse effect is bound to the viewport, by default it disappears before the edge completely leaves the screen (for those with knowledge in mathematics: the pulse is an inscribed oval inside of the viewport). To counter this, a stretch value is introduced that stretches the effect beyond where it would normally end.By correctly setting the value, it can be guaranteed that the pulse effect always leaves the visible screen before dissapearing. You need to manually set the value each time you drastically change the pulse' length or egde thickness, as those settings may result in the effect not disappearing outside of the screen. However, setting the stretch too high will render most of the effect off-screen.
Main Texture
This property is not used by the shader, but is necessary for the sprite renderer. Leave it blank.
Controller
The controller value for the pulse effect. This value needs to be lerped manually between 0 and 1 from your scripts
(an example is provided in the package), or alternatively, you can use the provided
controller script for performing the pulse effect.
Debug
Checking this option will immediately start repeating the effect indefinitely. This is particularly useful when setting up the effect, as you can quickly find a suitable color/thickness/distortion/etc combination for the pulse.
Fade Controller
The controller value for fading the screen in and out during the pulse effect. This value needs to be lerped manually between 0 and 1 from your scripts
(an example is provided in the package), or alternatively, you can use the provided
controller script's "Fade On Screen Pulse" option
which will automatically perform a complete screen fade in and out effect for you.
Screen Size Ratio
This is the ratio between the screen height and the screen width (aspect ratio).
Since most screens are rectangular, the fullscreen pulse must stretch in a specified ratio so that it remains circular
(for those with knowledge in mathematics: recall the stretch
option - the fullscreen pulse effect is technically an inscribed oval inside of a rectangle).
The ratio is exactly that of the screen, or more concretely, that of the main camera's viewport
(for example, a common aspect ratio would be 16:9 for a typical desktop screen).
In case you are manually controlling the fullscreen pulse effect, you need to manually set this value as well. You could set it to a constant number such as 1,(7) (16 divided by 9) for a 16:9 aspect ratio, or use the main camera's aspect ratio in order to accommodate for a large variety of aspect ratios (see Camera.aspect for more information).
If you are using the controller script for performing the pulse effect, the ratio value is automatically calculated and set so that the pulse wave always remains circular.
Alternatively, you could set the screen size ratio to a constant value in order to make the effect take an oval shape instead of a circular one.
In case you are manually controlling the fullscreen pulse effect, you need to manually set this value as well. You could set it to a constant number such as 1,(7) (16 divided by 9) for a 16:9 aspect ratio, or use the main camera's aspect ratio in order to accommodate for a large variety of aspect ratios (see Camera.aspect for more information).
If you are using the controller script for performing the pulse effect, the ratio value is automatically calculated and set so that the pulse wave always remains circular.
Alternatively, you could set the screen size ratio to a constant value in order to make the effect take an oval shape instead of a circular one.