Available since LÖVE 0.9.0
These built-in shader variables are not supported in earlier versions.
There are several built-in variables LÖVE provides in vertex and pixel shaders. All built-in variables are read-only unless otherwise specified.
mat4 TransformMatrixmat4 ProjectionMatrixmat4 TransformProjectionMatrixtransform_projection argument to the vertex shader position function.vec4 VaryingTexCoordVertexTexCoord in the vertex shader before the position function is called. Used as the texture_coords argument to the pixel shader effect function. Writable in the vertex shader. Use this variable to change the texture coordinate in the vertex shader.vec4 VaryingColorConstantColor * gammaCorrectColor(VertexColor) in LÖVE 0.10.0 and newer, or VertexColor in 0.9.2 and older, in the vertex shader before the position function is called. Used as the color argument to the pixel shader effect function. Writable in the vertex shader. Use this variable to change the per-vertex or constant color in the vertex shader. Available since LÖVE 0.9.1
This shader variable is not supported in earlier versions.
vec4 love_ScreenSizelove_ScreenSize.xy or vec2(love_ScreenSize).vec4 VertexPositionvertex_position argument to the vertex shader position function. The third and fourth components of the vector are normally (0, 1).vec4 VertexTexCoordvec4 VertexColor Available since LÖVE 0.10.0
This shader variable is not supported in earlier versions.
vec4 ConstantColorvec4 array love_Canvaseseffect. Note that arrays in shaders are 0-based. Writable in the pixel shader when the effects function is used.
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Shader_Variables