B.Render.Sampler()

Represent a texture sampler.

To get the object use pass.sampler().

TYPES:

AddressModes

Describes texture addressing modes.

{B.Render.Address} u

texture addressing mode for the U-coordinate

{B.Render.Address} v

texture addressing mode for the V-coordinate

METHODS:

pass()

Returns linked pass.

RETURNS:

default()

Resets to default values.

// equivalent to
sampler.address(B.Render.Address.WRAP);
sampler.filter(B.Render.Filter.BILINEAR);

RETURNS:

address(modes)

Sets texture addressing mode.

PARAMETERS:

RETURNS:

address(u, v)

Sets texture addressing mode separately.

sampler.address(modeU, modeV);
sampler.address(modeUV);

PARAMETERS:

{B.Render.Address} u

mode for the U-coordinate (for both UV if v-argument is omitted)

{B.Render.Address} [v]

mode for the V-coordinate

RETURNS:

address()

Gets texture addressing mode.

filter(mode)

Sets texture filtering mode.

PARAMETERS:

RETURNS:

filter()

Gets texture filtering mode.

RETURNS:

anisotropy(level)

Sets texture anisotropy level.

To check hardware supports of texture anisotropy use device.caps().samplerAnisotropy.

To check maximum anisotropy level use device.caps().samplerMaxAnisotropy.

PARAMETERS:

{number} level

RETURNS:

anisotropy()

Gets texture anisotropy level.

RETURNS:

{number}

TYPES:

METHODS: