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.
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:
- Edge Detection using Sobel Operator
- Sharpening
- Blur
- Contrast Enhancement
- Image negative