Shader:clone

Clones a shader. This creates an inexpensive copy of it with different flags. It can be used to create several variants of a shader with different behavior.

shader = Shader:clone(source, flags)

Arguments

NameTypeDescription
sourceShader The Shader to clone.
flagstable The flags used by the clone.

Returns

NameTypeDescription
shaderShader The new Shader.

See also