Material:setTexture

Sets a texture for a Material. Different types of textures are supported for different lighting parameters. If set to nil, textures default to a blank white texture.

Material:setTexture(textureType, texture)

Arguments

NameTypeDefaultDescription
textureTypeMaterialTexture'diffuse'The type of texture to get.
textureTextureThe texture to apply, or nil to use the default.

Returns

Nothing


Material:setTexture(texture)

Arguments

NameTypeDescription
textureTextureThe texture to apply, or nil to use the default.

Returns

Nothing


Material:setTexture(textureType, canvas)

Arguments

NameTypeDefaultDescription
textureTypeMaterialTexture'diffuse'The type of texture to get.
canvasCanvasA Canvas. The first Texture attached to the Canvas will be used.

Returns

Nothing


Material:setTexture(canvas)

Arguments

NameTypeDescription
canvasCanvasA Canvas. The first Texture attached to the Canvas will be used.

Returns

Nothing

See also