Massive FPS loss and crashes when using +15 lights

Hi, posting in General Discussion as I don’t know if this is simply a limitation of TouchDesigner’s engine or if it’s a bug.

I’m having issues with massive FPS losses when using more than 10 lights at once in a single Render TOP, more than 20 lights can cause sudden crashes (with the window being "Not Responding) and no logs or autosaves like in some other types of crashes.

My PC:
Windows 10, running latest version of TD, latest GPU driver
AMD Ryzen 5 2600, 16GB RAM, GTX 1050 Ti 4GB VRAM

I was thinking it would be maybe caused by weak hardware (even though running 20 lights isn’t THAT demanding I guess) but when I checked Task Manager, TouchDesigner was barely using 1% of my CPU and 2% of my GPU, also only using about 1.5GB of RAM and like 600MB of VRAM at most


So what are my options here? Just forget about running more than 5 lights at once or can I do something to remediate this issue? I noticed that if I lower my resolution the problem goes away but I seriously don’t want to do that as I’m already running at 720p (free version here).

In normal realtime rendering in TD the max number of lights is very limited (let’s say 5-10). If you need more dynamic lights, you can use a technique called deferred lighting (or deferred shading).
Here’s an older but still relevant tutorial which covers it:

Note: if you open the example .toe files, it gives an error in the GLSL TOP (check the Info DAT to see the line nr where the error occurs) , in that GLSL code, just replace every texelFetchBuffer for texelFetch

1 Like

Thank you, I’ll check that out. I was just hoping I wouldn’t have to learn GLSL to do something so “trivial” like that.

I thought the number of lights was a limitation of OpenGL that would go away when TD switched for Vulkan.

This old article still explains it quite well why it’s not so trivial to have more than just a few lights in forward rendering.

1 Like