Circular flashlight effect shader.
This shader can be used to create a circular flashlight effect around the object. It renders its effect only for a scene object this shader is attached to (i.e. it does not work for entire screen).
Whether or not to toggle on the shader effect automatically. Default value is
Radius of circular flashlight effect.
Predicate allowing to skip certain pixel from the shader. Predicate takes a pixel (with its Z-order), and X and Y-coordinate of that pixel. Note that XY-coordinates are always in relation to the entire canvas. Typically used to skip background or certain Z-index. Default predicate returns
falsefor all pixels.
- See also
See CPShaderExample class for the example of using shaders.
Called on each frame pass on scene object that has this shaders attached to it. This callback is called regardless of whether or not the scene object is visible or in camera frame.
Gets the origin of this asset. Typically, this should be a URL, file name or class name for in-code assets like array images, animations or system font.