setConstant

fun setConstant(name: String, value: Int)

Sets the value of a specialization constant, overriding the Material's. Panics if the constant doesn't exist or has another type. Compiles new programs when the value changes, so prefer Material.Builder.constant where the value is known up front.

Parameters

name

Constant name as defined in the material

value

Value of the constant


fun setConstant(name: String, value: Float)
fun setConstant(name: String, value: Boolean)

See also