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

1.2 KiB

Ellipse Node

Description

Generates an ellipse shape based on input UV at the size specified by inputs Width and Height. The generated shape can be offset or tiled by connecting a Tiling And Offset Node. Note that in order to preserve the ability to offset the shape within the UV space the shape will not automatically repeat if tiled. To achieve a repeating dot effect first connect your input through a Fraction Node.

NOTE: This Node can only be used in the Fragment Shader Stage.

Ports

Name Direction Type Binding Description
UV Input Vector 2 UV Input UV value
Width Input Vector 1 None Ellipse width
Height Input Vector 1 None Ellipse height
Out Output Vector 1 None Output value

Generated Code Example

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

void Unity_Ellipse_float(float2 UV, float Width, float Height, out float4 Out)
{
    float d = length((UV * 2 - 1) / float2(Width, Height));
    Out = saturate((1 - d) / fwidth(d));
}