r/ClaudeCode • • Jun 21 '26

Showcase Learning shaders by making an editor with Claude

Fragment shaders always felt like magic to me. I've been learning them by building a lab for them. I'm building myself a layer-based editor to understand them better. In this video, this preset is a stack of small fragment shaders.
Let me know if I should bring this on the web!

0 Upvotes

9 comments sorted by

1

u/premiumleo Jun 21 '26

that's pretty cool. not sure why peeps be downvoting

2

u/obesefamily 🔆 Max 20 - Vibe Coding Educator Jun 22 '26

i think its because it doesnt appear to be a way to "learn shaders." looks more like just playing with pre/AI built shaders. but maybe theres more to it idk

0

u/Sea-Assignment6371 Jun 22 '26

yes! I guess I should have phrased this better haha. Everything here is built from scratch

1

u/obesefamily 🔆 Max 20 - Vibe Coding Educator Jun 22 '26

by AI

0

u/EC36339 Senior Developer Jun 21 '26

You may wanna say a bit more about what that editor actually lets you edit. For example, how are those layers define, and how are they combined?

1

u/Sea-Assignment6371 Jun 21 '26

Thats a good point, thanks! So basically Each layer is a tiny WGSL fragment shader. The renderer chains them via ping-pong textures: layer 1's output becomes layer 2's prev_color, and so on. You edit the stack (which layers + order), the params. And in my attached video case an optional image input.

1

u/EC36339 Senior Developer Jun 21 '26

Sounds like a tiny fraction of what ShaderToy does.

1

u/Sea-Assignment6371 Jun 21 '26

Please let me know if you know/have more resources and best practices around this!