Documentation

Unity Engine

Download Unity

Unity Engine

TryGetMatrix(int, out Matrix4x4)

Reads a matrix property that this pass has written.
Read time 1 minuteLast updated 6 days ago

Definition

TryGetMatrix(int, Matrix4x4)

public bool TryGetMatrix(int nameID, out Matrix4x4 value)

Parameters

nameID

The property ID, from Shader.PropertyToID.

The value that the shader reads, or zero when the method returns false.

Returns

Type

Description

boolTrue if this pass has written the property as a matrix.

Remarks

Unlike FilterParameterWriter.GetOrAddMatrixRef, this method doesn't add the property. It doesn't read the value of the material.