Available since LÖVE 0.8.0 and removed in LÖVE 0.9.0
It has been renamed to love.graphics.newShader.
Creates a new PixelEffect object for hardware-accelerated pixel level effects.
A PixelEffect contains at least one function, named effect
, which is the effect itself, but it can contain additional functions.
pixeleffect = love.graphics.newPixelEffect( code )
string code
PixelEffect pixeleffect
Pixel effects are not programmed in Lua, but by using a special effect language instead. The effect language is basically GLSL 1.20 (specs) with a few aliases added for existing types:
GLSL | Effect language |
---|---|
float | number |
sampler2D | Image |
uniform | extern |
texture2D(tex, uv) | Texel(tex, uv) |
vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords )
vec4 color
Image texture
vec2 texture_coords
vec2 screen_coords
vec4 output_color
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.newPixelEffect