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

967 B

Texel Size Node

Description

Returns the Width and Height of the texel size of Texture 2D input. Uses the built in variable {texturename}_TexelSize to access special properties of a Texture 2D.

Note: Do not use the default input to reference your Texture 2D. It makes your graph perform worse. Instead connect this node to a separate Texture 2D Asset Node and re-use this definition for sampling.

Ports

Name Direction Type Binding Description
Texture Input Texture None Texture asset
Width Output Vector 1 None Texel width
Height Output Vector 1 None Texel height

Generated Code Example

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

float _TexelSize_Width = Texture_TexelSize.z; 
float _TexelSize_Height = Texture_TexelSize.w;