Naev

Module love_shaders

A module containing a diversity of Love2D shaders for use in Naev.

These are designed to be used with the different aspects of the VN framework.

In general all shaders have a "strength" parameter indicating the strength of the effect. Furthermore, those that have a temporal component have a "speed" parameter. These are all normalized such that 1 is the default value. Temporal component can also be inverted by setting a negative value.

Functions

shader2canvas (shader[, width=love.w[, height=love.h]]) Renders a shader to a canvas.
blur (image[, kernel_size=5[, blurtype="gaussian"]]) Blur shader applied to an image.
oldify (params) Creates an oldify effect, meant for full screen effects.
hologram (params) A hologram effect, mainly meant for VN characters.
corruption (params) A corruption effect applies a noisy pixelated effect.
steam (params) A rolling steamy effect.
aura (params) An aura effect for characters.

Tables

shaderparams Shader common parameter table.


Functions

shader2canvas (shader[, width=love.w[, height=love.h]])
Renders a shader to a canvas.

Parameters:

  • shader Shader Shader to render.
  • width number Width of the canvas to create (or nil for fullscreen). (default love.w)
  • height number Height of the canvas to create (or nil for fullscreen). (default love.h)

Returns:

    Canvas Generated canvas.
blur (image[, kernel_size=5[, blurtype="gaussian"]])
Blur shader applied to an image.

Parameters:

  • image Drawable A drawable to blur.
  • kernel_size number The size of the kernel to use to blur. This is the number of pixels in the linear case or the standard deviation in the Gaussian case. (default 5)
  • blurtype string Either "linear" or "gaussian". (default "gaussian")
oldify (params)
Creates an oldify effect, meant for full screen effects.

Parameters:

  • params Parameter table where "strength" field is used.

See also:

hologram (params)
A hologram effect, mainly meant for VN characters.

Parameters:

  • params Parameter table where "strength" field is used.

See also:

corruption (params)
A corruption effect applies a noisy pixelated effect.

Parameters:

  • params Parameter table where "strength" field is used.

See also:

steam (params)
A rolling steamy effect. Meant as/for backgrounds.

Parameters:

  • params Parameter table where "strength" and "speed" fields is used.

See also:

aura (params)
An aura effect for characters.

The default size is 40 and refers to the standard deviation of the Gaussian blur being applied.

Parameters:

  • params Parameter table where "strength", "speed", "color", and "size" fields are used.

See also:

Tables

shaderparams
Shader common parameter table.

Fields:

  • strength number Strength of the effect normalized such that 1.0 is the default value.
  • speed number Speed of the effect normalized such that 1.0 is the default value. Negative values run the effect backwards. Only used for those shaders with temporal components.
  • color Color Color component to be used. Should be in the form of {r, g, b} where r, g, and b are numbers.
  • size number Affects the size of the effect.
generated by LDoc 1.4.6 Last updated 2021-04-18 17:10:51