Lafith Mattara


Unity Shader scripts for image manipulation

Shaders are small scripts that contain the mathematical calculations and algorithms for calculating the colour of each pixel rendered, based on the lighting input and the material configuration. These scripts are run on GPU. This work is my attempt to implement common image manipulation techniques in Unity Shader Scripts.

Code is available here.

edge.gif
Figure 1: Sample result

Basic idea is to treat the image as a texture. This will let access the nearby texels(pixels), hence enabling us to implement kernel convolution. In this Unity project I have implemented following image effects:

Date: 2022-08-21 Sun 00:00

Emacs 27.1 (Org mode 9.3)