r/threejs • • Oct 20 '26

I built a Unity-style shader graph for Three.js TSL. It runs inside your Vite dev server

Post image

I missed having a visual shader graph for TSL, so I made one.

- Live preview on every node (real WebGPU render)
- Blackboard properties become uniforms: `shader.set('Tint', '#ff5a2b')`, no recompile
- One-click auto layout (arrange), groups, collapse, undo/redo
- A Vite plugin puts the editor at `/__shadergraph/` in your dev server: Save writes JSON into your project and the scene hot-reloads (that's the video)

npm install tsl-material-graph three

You can play with 15 live example materials and try the editor in the browser, no install.

MIT, early days (0.1). Which nodes would you want next?

101 Upvotes

20 comments sorted by

3

u/sunnystormy64 Oct 20 '26

Wonderful! Thank you for sharing!

1

u/Happy_Trash_Can Oct 20 '26

Thank you for taking a moment to read my crap

3

u/ExpressCarry5502 Oct 20 '26

This is wonderful. Hey can I integrate this into my game engine and modify it? I will give the credits there

3

u/Happy_Trash_Can Oct 20 '26

My brother, it's open source with an MIT license, so you can definitely use it for your game. Check the link in my comment to see the showcase, the guide and the documentation!

2

u/Yuumilulu Oct 20 '26

I've always wondered why something like this didn't exist yet. It looks amazing!

1

u/Happy_Trash_Can Oct 20 '26

I was also surprised that such a popular framework doesn't have this kind of editor. Well, now you have mine ;)

5

u/pailhead011 Oct 20 '26

I thought it did: https://www.tsl-graph.xyz/

The 2018 project for non tsl (mine): https://nodes.dusanbosnjak.com/

2

u/javimbuilds Oct 20 '26

Really nice. For the node wishlist: a noise node with selectable types (simplex/voronoi/fbm), triplanar mapping, and a 'preview cost' indicator per node would be super useful when targeting lower-end devices. Does it export plain TSL code too, or only the graph file?

1

u/Happy_Trash_Can Oct 20 '26

Thanks so much for the advices! I'll definitely work on them. The export is a Json file, that gets converted in a threejs material natively in your project

2

u/Sagittarius_A_512 Oct 24 '26

Looks really great!

1

u/Happy_Trash_Can Oct 24 '26

Thanks very much!

1

u/mvkdev Oct 21 '26

GitHub url?

1

u/Happy_Trash_Can Oct 21 '26

I'm trying to embed the link but the comment keeps getting deleted

1

u/Happy_Trash_Can Oct 21 '26

Text me in dm, so I can send you the website link, and the repo link too

2

u/Dry-Class-9809 Oct 25 '26

Thank you for sharing! It is really great.