/unity-2d-vfx

A collection of visual effects for 2D Unity projects.

Primary LanguageC#MIT LicenseMIT

Visual Effects for 2D Unity Projects

This package has a variety of shaders that are not included by default in Unity.

The shaders are made with the Shader Graph tool, avaiable only in URP.
~ Built-in RP not supported.

Examples

Apply effects directly to sprites.

(Not avaiable yet) Create ripple effects on the screen.

Stylized and dynamic water.

Installation

Install via Unity's Package Manager

  1. Open the add menu in the Package Manager’s toolbar.
  2. Select Add package from git URL from the add menu.
  3. Enter the following URL:
https://github.com/Magnno/Unity_2D_VFX.git

How to use

Water

Create a water GameObject by going to GameObject / 2D Object / Water.

This process will generate a parent GameObject named "Water" along with a child GameObject named "Render Camera." It will also generate a material and a render texture, both of which will be stored in the scene's subfolder.

The "Water" GameObject has components to generate the mesh of the water. It's possible to set the width, height and vertex count. There is also a component to change the sorting order.

The "Render Camera" GameObject has a camera that will render onto the generated render texture. This is for creating visual effects in the water shader, such as refraction and reflection.

Note: The rendering camera should omit rendering the water and any object passing in front of it. Use the camera's culling mask to filter layers. By default, the "Water" GameObject is assigned to the "Water" layer, which will be omitted.

To change the appearence of the water, go to the generated material and adjust the parameters.