GLSL for POPs in TouchDesigner: Lesson 6 (GLSL Advanced POP – Voronoi Fracture pt. 1)

In this lesson of GLSL in POPs, we build the foundation of a fully GPU-driven Voronoi system using GLSL Advanced POP to classify a mesh into clean, real-time Voronoi regions.

We take a triangulated mesh, project it into 2D space, and compute the nearest Voronoi site for every vertex directly on the GPU by accessing primitive, vertex and point data in the same shader. By comparing distances to a set of input sites, we generate a region ID per vertex and identify which triangles belong to which part of the Voronoi diagram.

📌 Key Topics Covered:✅ How to project a 3D mesh into 2D for Voronoi computation✅ Reading site positions from a second input source✅ GPU-based nearest-site search and region labeling✅ Detecting when triangles stay inside a single Voronoi region✅ Using uniforms to switch projection axes (XY, XZ, YZ)✅ Visualizing region assignments with GPU-driven per-primitive color

🎨 Exercises & Challenges:🛠️ Color triangles based on their region index to visualize the full Voronoi tiling🛠️ Animate the site positions to create shifting, flowing Voronoi cells🛠️ Add a mode to hide or isolate specific regions for debugging🛠️ Use noise or point SOPs to generate dynamic Voronoi site layouts

🔗 Further Learning:

TouchDesigner Docs → https://docs.derivative.ca
Writing GLSL POPs → https://derivative.ca/UserGuide/Experimental:Write_GLSL_POPs
GLSL in TouchDesigner (Courses & Files) → https://www.patreon.com/water__shed

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:02 – Intro
00:47 – Why is the GLSL Advanced POP Awesome????
04:07 – Voronoi Algo Discussion
07:46 – Begin TouchDesigner Section – System Overview
14:30 – Voronoi Shader Review
27:23 – Outtro

About The Author

You might be interested in

AllTD Stats last 30 days

Pageviews 54,060

Days in Range 28

Average Daily Pageviews 1,931

From Any SERP 1,048

Unique IPs 14,916

Last 30 minutes 42

Today 69

Yesterday 1,468