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

1.7 KiB

Setting up normal map and mask Textures

2D Lights can interact with normal map and mask Textures linked to Sprites to create advanced lighting effects. To link these additional Textures to your Sprite, select the Sprite and open the Sprite Editor. Select the Secondary Textures module from the drop-down menu at the top left of the Sprite Editor window.

To add a new Secondary Texture entry, select the ‘‘+’’ at the bottom right of the Secondary Textures panel. Each Secondary Texture appears as its own entry in a list, each with two fields: Name and Texture.

You can enter a custom Name for the Secondary Texture, however some Unity packages may suggest Texture names that allow the Secondary Texture be used with their Shaders, such as the 2D Lights package.

Use the drop-down arrow to the right of the Name field to display the list of suggested names. With the 2D Lights package installed, you will find the suggested names ‘MaskTex’ and ‘NormalMap’ available from the menu. Select the name that matches the function of the selected Texture - for this package, select ‘MaskTex’ for a masking Texture, or ‘NormalMap’ for a normal map Texture.

Assign a Texture2D Asset to the Texture field by dragging the Texture Asset directly onto the Texture box, or open the Object Picker window by selecting the circle to the right and select a Texture2D Asset from the list.

Select Apply on the toolbar to save your entries. Entries without a Name or selected Texture are considered invalid and are automatically removed when changes are applied.