SetMatrix
Sets the value of a matrix uniform.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
SetMatrix(int, Matrix4x4)
Sets the value of a matrix uniform.
public void SetMatrix(int nameID, Matrix4x4 val)
Parameters
Remarks
Only shaders defined in the .raytrace file can access the matrix you designate as the argument for this method. To make this matrix accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalMatrix method instead.
SetMatrix(string, Matrix4x4)
Sets the value of a matrix uniform.
public void SetMatrix(string name, Matrix4x4 val)
Parameters
Remarks
Only shaders defined in the .raytrace file can access the matrix you designate as the argument for this method. To make this matrix accessible to all ray tracing shader types (closest hit, any hit, miss, etc.), call the Shader.SetGlobalMatrix method instead.