lovr.graphics.newShader

Creates a new Shader.

shader = lovr.graphics.newShader(vertex, fragment)

Arguments

NameTypeDescription
vertexstringThe code or filename of the vertex shader. If nil, the default vertex shader is used.
fragmentstringThe code or filename of the fragment shader. If nil, the default fragment shader is used.

Returns

NameTypeDescription
shaderShaderThe new Shader.

See also