ShaderGraphMaterial

Provides methods to query and modify material parameters for dynamic customization at runtime.

Each parameter is accessible by name and supports various data types.

Types

Link copied to clipboard
object Companion

The companion object of ShaderGraphMaterial.

Functions

Link copied to clipboard

Gets the blending mode of the ShaderGraphMaterial.

Link copied to clipboard
fun getDepthTest(): Boolean

Gets the state of depth testing for the material.

Link copied to clipboard
fun getDepthWrite(): Boolean

Gets the state of depth writing for the material.

Link copied to clipboard
fun getName(): String

Gets the name of the ShaderGraphMaterial.

Link copied to clipboard
inline fun <T> getParameter(parameterName: String): T
fun <T> getParameter(parameterName: String, clazz: Class<T>): T

Gets the the value of a parameter by its name and type.

Link copied to clipboard
fun getParameterNames(): Array<String>

Gets all parameter names of the ShaderGraphMaterial.

Link copied to clipboard

Gets the fill mode for rendering polygons in the material.

Link copied to clipboard
fun setBlendingMode(blendingMode: BlendingMode)

Sets the blending mode of the ShaderGraphMaterial.

Link copied to clipboard
Link copied to clipboard
fun setDepthTest(depthTest: Boolean)

Enables or disables depth testing for the material.

Link copied to clipboard
fun setDepthWrite(depthWrite: Boolean)

Enables or disables depth writing for the material.

Link copied to clipboard
fun setParameter(parameterName: String, value: TextureResource)

Sets the value of a texture resource parameter by its name.

fun setParameter(parameterName: String, value: Color3)

Sets the value of a color3 parameter by its name.

fun setParameter(parameterName: String, value: Color4)

Sets the value of a color4 parameter by its name.

fun setParameter(parameterName: String, value: Matrix3)

Sets the value of a matrix3 parameter by its name.

fun setParameter(parameterName: String, value: Matrix4)

Sets the value of a matrix4 parameter by its name.

fun setParameter(parameterName: String, value: Vector2)

Sets the value of a vector2 parameter by its name.

fun setParameter(parameterName: String, value: Vector3)

Sets the value of a vector3 parameter by its name.

fun setParameter(parameterName: String, value: Vector4)

Sets the value of a vector4 parameter by its name.

fun setParameter(parameterName: String, value: Boolean)

Sets the value of a boolean parameter by its name.

fun setParameter(parameterName: String, value: Float)

Sets the value of a float parameter by its name.

fun setParameter(parameterName: String, value: Int)

Sets the value of an integer parameter by its name.

Link copied to clipboard
fun setPolygonFillMode(polygonFillMode: PolygonFillMode)

Sets the fill mode for rendering polygons in the material.