Pass:setClear

Edit

Sets the clear values of the pass. This controls the initial colors of the canvas texture pixels at the beginning of the render pass. For each color texture, it can be one of the following:





Set the clear color for all color textures, using a hexcode.

Arguments

NameTypeDescription
hexnumber A hexcode color to clear all color textures to.

Returns

Nothing

Set the clear color for all color textures, using numbers.

Arguments

NameTypeDefaultDescription
rnumber The red component of the clear color.
gnumber The green component of the clear color.
bnumber The blue component of the clear color.
anumber1.0 The alpha component of the clear color.

Returns

Nothing

Set the clear color for all color textures, using a boolean.

Arguments

NameTypeDescription
clearboolean Whether color textures should be cleared.

Returns

Nothing

Set the clear color for all color textures using a table, or set clear values for individual textures.

Arguments

NameTypeDescription
ttable A table of clear values. This can be a table of 4 numbers to use for all color textures, or it can be a list of boolean and/or RGBA tables to use for each individual color texture. It can also have a depth key with a boolean/number for the depth texture's clear.

Returns

Nothing

Notes

If the depth clear is not given, it will be set to 0.

All clear colors will default to transparent black (all zeros) when the Pass is created.

See also