Mastering GLSL in TouchDesigner, Lesson 11: Convolution Kernels
In this lesson of Mastering GLSL in TouchDesigner, we explore convolution kernels, a powerful technique for image filtering that allows for effects like sharpening, edge detection, embossing, and Gaussian blur. You’ll learn how convolution matrices modify pixel neighborhoods and how to implement multi-pass filtering for dynamic effects.
๐ Key Topics Covered:
โ
Understanding convolution kernels and how they alter images
โ
Implementing sharpening, edge detection, and motion blur
โ
Using mipmaps and textureLod() for efficient sampling
โ
Applying multiple shader passes for more complex effects
๐จ Exercises & Challenges:
๐ ๏ธ Implement a custom convolution kernel from scratch
๐ ๏ธ Build a CRT effect with vignette, scanlines, and chromatic aberration
๐ ๏ธ Create a unique effect by combining multiple filtering techniques
Explanation of kernels with some good illustrations: https://medium.com/@timothy_terati/image-convolution-filtering-a54dce7c786b
Interactive convolution kernel explorer: https://setosa.io/ev/image-kernels/
Find me online:
๐น Project Files & Patreon: https://www.patreon.com/water__shed
๐น Portfolio: https://www.lakeheckaman.com
๐น Instagram: https://instagram.com/lake_heckaman
00:00 – Start
00:04 – Intro: Advanced Image Filters with GLSL
01:08 – Image Convolution Kernel
09:49 – Implementing kernels in GLSL
12:11 – Mipmaps
16:39 – Convolve TOP
17:56 – Begin TouchDesigner Examples
19:08 – TextureLOD
22:36 – Edge Detection (Sobel Filter) in GLSL
27:33 – Sharpen Filter
31:30 – Emboss
32:34 – Barrel Blur GLSL TouchDesigner
34:24 – Exercises