setParameter

actual fun setParameter(name: String, x: Boolean)

Sets a boolean parameter.

Parameters

name

Parameter name as defined in the material

x

Boolean value


actual fun setParameter(name: String, x: Float)

Sets a float parameter.

Parameters

name

Parameter name as defined in the material

x

Float value


actual fun setParameter(name: String, x: Int)

Sets an integer parameter.

Parameters

name

Parameter name as defined in the material

x

Integer value


actual fun setParameter(name: String, x: Boolean, y: Boolean)

Sets a 2-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Float, y: Float)

Sets a 2-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Int, y: Int)

Sets a 2-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean)

Sets a 3-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Float, y: Float, z: Float)

Sets a 3-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Int, y: Int, z: Int)

Sets a 3-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)

Sets a 4-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Float, y: Float, z: Float, w: Float)

Sets a 4-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Int, y: Int, z: Int, w: Int)

Sets a 4-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, texture: Texture, sampler: TextureSampler)

Sets a texture parameter with sampler configuration.

Note: Depth textures cannot be sampled with linear filtering unless comparison mode is set to COMPARE_TO_TEXTURE.

Parameters

name

Parameter name as defined in the material

texture

Texture to bind (can be null to unbind)

sampler

Sampler configuration (filtering, wrapping, comparison function)


actual fun setParameter(name: String, type: MaterialInstance.BooleanElement, v: BooleanArray, offset: Int, count: Int)

Sets a parameter from a boolean array.

Parameters

name

Parameter name as defined in the material

type

Array element type (BOOL, BOOL2, BOOL3, or BOOL4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.IntElement, v: IntArray, offset: Int, count: Int)

Sets a parameter from an integer array.

Parameters

name

Parameter name as defined in the material

type

Array element type (INT, INT2, INT3, or INT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.FloatElement, v: FloatArray, offset: Int, count: Int)

Sets a parameter from a float array.

Parameters

name

Parameter name as defined in the material

type

Array element type (FLOAT, FLOAT2, FLOAT3, FLOAT4, MAT3, or MAT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: Colors.RgbType, r: Float, g: Float, b: Float)

Sets an RGB color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1


actual fun setParameter(name: String, type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float)

Sets an RGBA color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1

a

Alpha channel 0, 1

expect fun setParameter(name: String, x: Boolean)

Sets a boolean parameter.

Parameters

name

Parameter name as defined in the material

x

Boolean value


expect fun setParameter(name: String, x: Float)

Sets a float parameter.

Parameters

name

Parameter name as defined in the material

x

Float value


expect fun setParameter(name: String, x: Int)

Sets an integer parameter.

Parameters

name

Parameter name as defined in the material

x

Integer value


expect fun setParameter(name: String, x: Boolean, y: Boolean)

Sets a 2-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


expect fun setParameter(name: String, x: Float, y: Float)

Sets a 2-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


expect fun setParameter(name: String, x: Int, y: Int)

Sets a 2-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


expect fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean)

Sets a 3-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


expect fun setParameter(name: String, x: Float, y: Float, z: Float)

Sets a 3-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


expect fun setParameter(name: String, x: Int, y: Int, z: Int)

Sets a 3-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


expect fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)

Sets a 4-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


expect fun setParameter(name: String, x: Float, y: Float, z: Float, w: Float)

Sets a 4-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


expect fun setParameter(name: String, x: Int, y: Int, z: Int, w: Int)

Sets a 4-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


expect fun setParameter(name: String, texture: Texture, sampler: TextureSampler)

Sets a texture parameter with sampler configuration.

Note: Depth textures cannot be sampled with linear filtering unless comparison mode is set to COMPARE_TO_TEXTURE.

Parameters

name

Parameter name as defined in the material

texture

Texture to bind (can be null to unbind)

sampler

Sampler configuration (filtering, wrapping, comparison function)


expect fun setParameter(name: String, type: MaterialInstance.BooleanElement, v: BooleanArray, offset: Int, count: Int)

Sets a parameter from a boolean array.

Parameters

name

Parameter name as defined in the material

type

Array element type (BOOL, BOOL2, BOOL3, or BOOL4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


expect fun setParameter(name: String, type: MaterialInstance.IntElement, v: IntArray, offset: Int, count: Int)

Sets a parameter from an integer array.

Parameters

name

Parameter name as defined in the material

type

Array element type (INT, INT2, INT3, or INT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


expect fun setParameter(name: String, type: MaterialInstance.FloatElement, v: FloatArray, offset: Int, count: Int)

Sets a parameter from a float array.

Parameters

name

Parameter name as defined in the material

type

Array element type (FLOAT, FLOAT2, FLOAT3, FLOAT4, MAT3, or MAT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


expect fun setParameter(name: String, type: Colors.RgbType, r: Float, g: Float, b: Float)

Sets an RGB color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1


expect fun setParameter(name: String, type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float)

Sets an RGBA color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1

a

Alpha channel 0, 1

actual fun setParameter(name: String, x: Boolean)

Sets a boolean parameter.

Parameters

name

Parameter name as defined in the material

x

Boolean value


actual fun setParameter(name: String, x: Float)

Sets a float parameter.

Parameters

name

Parameter name as defined in the material

x

Float value


actual fun setParameter(name: String, x: Int)

Sets an integer parameter.

Parameters

name

Parameter name as defined in the material

x

Integer value


actual fun setParameter(name: String, x: Boolean, y: Boolean)

Sets a 2-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Float, y: Float)

Sets a 2-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Int, y: Int)

Sets a 2-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean)

Sets a 3-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Float, y: Float, z: Float)

Sets a 3-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Int, y: Int, z: Int)

Sets a 3-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)

Sets a 4-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Float, y: Float, z: Float, w: Float)

Sets a 4-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Int, y: Int, z: Int, w: Int)

Sets a 4-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, texture: Texture, sampler: TextureSampler)

Sets a texture parameter with sampler configuration.

Note: Depth textures cannot be sampled with linear filtering unless comparison mode is set to COMPARE_TO_TEXTURE.

Parameters

name

Parameter name as defined in the material

texture

Texture to bind (can be null to unbind)

sampler

Sampler configuration (filtering, wrapping, comparison function)


actual fun setParameter(name: String, type: MaterialInstance.BooleanElement, v: BooleanArray, offset: Int, count: Int)

Sets a parameter from a boolean array.

Parameters

name

Parameter name as defined in the material

type

Array element type (BOOL, BOOL2, BOOL3, or BOOL4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.IntElement, v: IntArray, offset: Int, count: Int)

Sets a parameter from an integer array.

Parameters

name

Parameter name as defined in the material

type

Array element type (INT, INT2, INT3, or INT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.FloatElement, v: FloatArray, offset: Int, count: Int)

Sets a parameter from a float array.

Parameters

name

Parameter name as defined in the material

type

Array element type (FLOAT, FLOAT2, FLOAT3, FLOAT4, MAT3, or MAT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: Colors.RgbType, r: Float, g: Float, b: Float)

Sets an RGB color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1


actual fun setParameter(name: String, type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float)

Sets an RGBA color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1

a

Alpha channel 0, 1

actual fun setParameter(name: String, x: Boolean)

Sets a boolean parameter.

Parameters

name

Parameter name as defined in the material

x

Boolean value


actual fun setParameter(name: String, x: Float)

Sets a float parameter.

Parameters

name

Parameter name as defined in the material

x

Float value


actual fun setParameter(name: String, x: Int)

Sets an integer parameter.

Parameters

name

Parameter name as defined in the material

x

Integer value


actual fun setParameter(name: String, x: Boolean, y: Boolean)

Sets a 2-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Float, y: Float)

Sets a 2-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Int, y: Int)

Sets a 2-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean)

Sets a 3-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Float, y: Float, z: Float)

Sets a 3-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Int, y: Int, z: Int)

Sets a 3-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)

Sets a 4-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Float, y: Float, z: Float, w: Float)

Sets a 4-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Int, y: Int, z: Int, w: Int)

Sets a 4-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, texture: Texture, sampler: TextureSampler)

Sets a texture parameter with sampler configuration.

Note: Depth textures cannot be sampled with linear filtering unless comparison mode is set to COMPARE_TO_TEXTURE.

Parameters

name

Parameter name as defined in the material

texture

Texture to bind (can be null to unbind)

sampler

Sampler configuration (filtering, wrapping, comparison function)


actual fun setParameter(name: String, type: MaterialInstance.BooleanElement, v: BooleanArray, offset: Int, count: Int)

Sets a parameter from a boolean array.

Parameters

name

Parameter name as defined in the material

type

Array element type (BOOL, BOOL2, BOOL3, or BOOL4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.IntElement, v: IntArray, offset: Int, count: Int)

Sets a parameter from an integer array.

Parameters

name

Parameter name as defined in the material

type

Array element type (INT, INT2, INT3, or INT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.FloatElement, v: FloatArray, offset: Int, count: Int)

Sets a parameter from a float array.

Parameters

name

Parameter name as defined in the material

type

Array element type (FLOAT, FLOAT2, FLOAT3, FLOAT4, MAT3, or MAT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: Colors.RgbType, r: Float, g: Float, b: Float)

Sets an RGB color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1


actual fun setParameter(name: String, type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float)

Sets an RGBA color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1

a

Alpha channel 0, 1

actual fun setParameter(name: String, x: Boolean)

Sets a boolean parameter.

Parameters

name

Parameter name as defined in the material

x

Boolean value


actual fun setParameter(name: String, x: Float)

Sets a float parameter.

Parameters

name

Parameter name as defined in the material

x

Float value


actual fun setParameter(name: String, x: Int)

Sets an integer parameter.

Parameters

name

Parameter name as defined in the material

x

Integer value


actual fun setParameter(name: String, x: Boolean, y: Boolean)

Sets a 2-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Float, y: Float)

Sets a 2-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Int, y: Int)

Sets a 2-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean)

Sets a 3-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Float, y: Float, z: Float)

Sets a 3-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Int, y: Int, z: Int)

Sets a 3-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component


actual fun setParameter(name: String, x: Boolean, y: Boolean, z: Boolean, w: Boolean)

Sets a 4-component boolean vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Float, y: Float, z: Float, w: Float)

Sets a 4-component float vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, x: Int, y: Int, z: Int, w: Int)

Sets a 4-component integer vector parameter.

Parameters

name

Parameter name as defined in the material

x

First component

y

Second component

z

Third component

w

Fourth component


actual fun setParameter(name: String, texture: Texture, sampler: TextureSampler)

Sets a texture parameter with sampler configuration.

Note: Depth textures cannot be sampled with linear filtering unless comparison mode is set to COMPARE_TO_TEXTURE.

Parameters

name

Parameter name as defined in the material

texture

Texture to bind (can be null to unbind)

sampler

Sampler configuration (filtering, wrapping, comparison function)


actual fun setParameter(name: String, type: MaterialInstance.BooleanElement, v: BooleanArray, offset: Int, count: Int)

Sets a parameter from a boolean array.

Parameters

name

Parameter name as defined in the material

type

Array element type (BOOL, BOOL2, BOOL3, or BOOL4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.IntElement, v: IntArray, offset: Int, count: Int)

Sets a parameter from an integer array.

Parameters

name

Parameter name as defined in the material

type

Array element type (INT, INT2, INT3, or INT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: MaterialInstance.FloatElement, v: FloatArray, offset: Int, count: Int)

Sets a parameter from a float array.

Parameters

name

Parameter name as defined in the material

type

Array element type (FLOAT, FLOAT2, FLOAT3, FLOAT4, MAT3, or MAT4)

v

Source array

offset

Index into v to start copying from

count

Number of elements to copy


actual fun setParameter(name: String, type: Colors.RgbType, r: Float, g: Float, b: Float)

Sets an RGB color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1


actual fun setParameter(name: String, type: Colors.RgbaType, r: Float, g: Float, b: Float, a: Float)

Sets an RGBA color parameter.

The color is converted based on the specified type (Linear or sRGB).

Parameters

name

Parameter name as defined in the material

type

Whether color is in Linear or sRGB space

r

Red channel 0, 1

g

Green channel 0, 1

b

Blue channel 0, 1

a

Alpha channel 0, 1