FBO Feedback Mouse Trail

Interactive Three.js/WebGL shader experiment using an FBO feedback loop (ping‑pong WebGLRenderTargets). Mouse movement is drawn into a 2D canvas (brush stamps + fade), uploaded every frame as a THREE.CanvasTexture, then rendered through a shader pipeline: a “trail pass” writes the current brush mask to a render target, and a feedback fragment shader re-samples the previous frame (tPrev), applies FBM noise displacement + blending, and outputs the next frame. The result is a fluid‑style trail with motion persistence, smearing, and time‑based color shifts.

3 Likes