Boat Attack使用了Universal RP的许多新图形功能,可以用于探索 Universal RP 的使用方式和技巧。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

1.4 KiB

Transformation Matrix Node

Description

Defines a constant Matrix 4x4 value for a common Transformation Matrix in the shader. The Transformation Matrix can be selected from the dropdown parameter.

Ports

Name Direction Type Binding Description
Out Output Matrix 4 None Output value

Controls

Name Type Options Description
Dropdown Model, InverseModel, View, InverseView, Projection, InverseProjection, ViewProjection, InverseViewProjection Sets output value

Generated Code Example

The following example code represents one possible outcome of this node per mode.

Model

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_M;

InverseModel

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_I_M;

View

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_V;

InverseView

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_I_V;

Projection

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_P;

InverseProjection

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_I_P;

ViewProjection

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_VP;

InverseViewProjection

float4x4 _TransformationMatrix_Out = UNITY_MATRIX_I_VP;