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 TransformMatrix
mat4 ProjectionMatrix
mat4 TransformProjectionMatrix
transform_projection
argument to the vertex shader position function.vec4 VaryingTexCoord
VertexTexCoord
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 VaryingColor
ConstantColor * 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_ScreenSize
love_ScreenSize.xy
or vec2(love_ScreenSize)
.vec4 VertexPosition
vertex_position
argument to the vertex shader position function. The third and fourth components of the vector are normally (0, 1).vec4 VertexTexCoord
vec4 VertexColor
Available since LÖVE 0.10.0
This shader variable is not supported in earlier versions.
vec4 ConstantColor
vec4 array love_Canvases
effect
. 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