How to animate thousands of fish without killing your FPS @WawaSensei
How to animate thousands of fish without killing your FPS  @WawaSensei
Uploaded October 2026 | Updated November 2026, 5 hours ago
Thousands of fish, one draw call, and the CPU never touches a single one.

GPGPU: the fish data lives in a buffer on the GPU, and a compute shader runs once per fish, all in parallel. Read neighbors, apply the rules, write the new position.

Instancing: instead of 4,000 "draw a fish here" messages, you send one: here's a fish, here are 4,000 places. The positions come straight from the buffer the compute shader just wrote.


πŸ”— LINKS
Live demo β†’ https://aquarium.wawasensei.dev/
Source β†’ github.com/wass08/aquarium

πŸš€ Learn React Three Fiber with the Ultimate Guide to 3D Web Development ✨
https://wawasensei.dev/courses/react-three-fiber/

#threejs #webgpu #creativecoding #gamedev #shaders


🧰 WHAT'S USED
Three.js / WebGPU, d3-delaunay, Rapier, Tweakpane, Remotion (the motion design)


β–¬β–¬β–¬β–¬β–¬β–¬ πŸ“š RESOURCES β–¬β–¬β–¬β–¬β–¬β–¬

Threejs
threejs.org

React Three Fiber
https://r3f.docs.pmnd.rs/getting-started/introduction


β–¬β–¬β–¬β–¬β–¬β–¬ Support the channel πŸ™ β–¬β–¬β–¬β–¬β–¬β–¬

Become a member to get access to awesome perks:
youtube.com/channel/UCBH-5ctALmmOrm4kczL3urQ/join

β–¬β–¬β–¬β–¬β–¬β–¬ Connect with me πŸ‘‹ β–¬β–¬β–¬β–¬β–¬β–¬

πŸ’» The Discord Community
discord.gg/2wBhwchcWu

πŸ“Έ Instagram :
instagram.com/wawa.sensei

🎎 Facebook :
facebook.com/wawasenseiyt

🐦Twitter :
twitter.com/wawasensei

🐦TikTok :
tiktok.com/@wawasensei08
How to animate thousands of fish without killing your FPSLets Fix Your React Three Fiber ProjectsReact Three Fiber tutorial - 3D animated Christmas ExperienceBuild a multiplayer game with React Three Fiber and Socket.ioHow to build a Dapp - Model the Infinity tower with Three.js (React Three Fiber)Multiplayer Game Tutorial with R3F & Socket.io: PathfindingHow to Bake Lighting with Blender for Three.jsThreejs & React Avatar Builder Tutorial - Part 7: Post ProcessingReact Three Fiber tutorial - 3D Table ConfiguratorVibe Code a 3D Carousel with Claude Code & Three.jsBuild a 3D Avatar Builder with Threejs and React - Full CourseThird Person Controller (React Three Fiber Tutorial)
Wawa Sensei |

How to animate thousands of fish without killing your FPS

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER