Memory

Project information

  • Category: Shader, VFX
  • Project date: 2021

Memory

This is a game under development using Unity URP.

There are 2 main shaders for this project: one for the lines and one for the nodes. And also some VFX.

The shader for the lines uses a mesh that is distorted horizontally by a gradient noise using local coordinates, so the object can be rotated and still distort as intended. The shape of the distortion is randomized so that each line in the scene is a little different. It uses the mesh's UV and gradient noise to do the white dots effects, and they're scaled to match the size of the line even if it's compressed or stretched. The amount and the speed of distortion, as well as the color of the line and dots, change in real-time when it connects two nodes. It also sends a wave of energy when a node is activated.

The node's shader uses gradient noise, and the UV coordinates are manipulated in a way so that the interior of the node seems hollow. The effects on the edge make use of the Fresnel effect as a mask.

When the player interacts with a node, it emits a subtle particle effect and sends out waves that move along the connected lines. The color transition uses tween functions to smoothly switch between the on and off states of lines and nodes.