Recursive Trail Ping‑Pong (Three.js Render‑to‑Texture Feedback)

A Three.js/WebGL render-to-texture recursion experiment that uses ping‑pong render targets and a fullscreen shader pass to accumulate an upward-moving trail, keeping the current frame crisp in front while the previous frames persist behind.

This technique can be used to create really cool stuff, like below!

In my case, this one is burning 100% of my GPU and it is moving really slow when I move my mouse over the images: Mirror Media Slider
If I move my mouse fast over the images it even freezes the entire browser for 10s.

Hmm.

I checked the performance on my side and is really good, what GPU do you have?

The built-in AMD Radeon Graphics card is used, as it is not switching to the Nvidia chip. The built in graphics is sitting at 100% usage, constant, while the page is open. image hosted at ImgBB — ImgBB

I see.

There is no way for me to test like that this projects do run on the GPU… I have an RTX 5700, and this is considered a medium-performance GPU these days. I have checked it; unfortunately, I can’t find any issues on my side, but I will keep this in mind as I advance in this journey.

1 Like

Please give it a try now, clear the browser cache. I made a few mistakes in the code, and I’ve fixed the,m but I can’t tell on my GPU everything flies ///

Yes, I can confirm that this update made wonders, everything is smooth for me now. The GPU also thanks you! :))

Thank you for testing this for me, I would have never known if not for your feedback!

1 Like