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

2.9 KiB

Light Blend Styles

Blend Styles determine the way a particular Light interacts with Sprites in the Scene. All Lights in the Scene must pick from one of the available Blend Styles. The UniversalRP 2D Asset can currently contain a total of four different Light Blend Styles, starting with the 'Default' Blend Style being available.

Property Function
Name The name that appears when choosing a Blend Style for a Light2D.
Mask Texture Channel Which mask channel to use when applying this Blend Style to a Sprite.
Render Texture Scale Scale for the internal render texture created for this Blend Style.
Blend Mode What blending mode the Light2D uses when this Blend Style is selected.

Blend Mode

Blend Modes controls the way a Sprite is lit by light. The following examples show the four predefined Blend Modes:

Original reference Multiply
Original Sprite Multiply
Additive Subtractive
Additive Subtractive

Custom Blend Modes

All of the Blend Modes available can be expressed with Custom Blend Factors. The factors for the existing Blend Modes are as follows:

  • Multiplicative

    • Modulate = 1
    • Additive = 0
  • Additive

    • Modulate = 0
    • Additive = 1
  • Subtractive

    • Modulate = 0
    • Additive = -1

Mask Texture Channel

Masks control where Lights can affect a Sprite. There are 4 channels to select from as the mask channel - Red, Blue, Green, and Alpha. In a mask max value means full light, min value means no light.

Original rock color Rock Mask
Original Rock Color Rock with a mask
Additive Light Blending Masked Additive Light Blending
Additive Light Blending Additive Light Blending with a mask

Render Texture Scale

Render Texture Scale adjusts the size of the internal render Texture used for a given Blend Mode. Lowering the Render Texture Scale can increase performance and decrease memory usage for Scenes that contain large Lights. Lowering the Texture Scale to too low a value may cause visual artefacts or a shimmering effect when there is motion in the Scene.