Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

shadertoy.com


The "problem" with it is that you only learn about fragment shaders, you should also learn about the WebGL API, and vertex shaders.


Not having to learn the API & vertex shaders is definitely a feature of ShaderToy, not a problem. :P The extremely low barrier to entry to writing shaders is one of it’s best qualities. Anyway, the question asked about 2d effects, so they maybe don’t need vertex shaders, and they can of course learn the small amount of WebGL API needed somewhere else like https://webgl2fundamentals.org/.


https://www.shadertoy.com/view/XXyGzh

... this is amazing!

I can't wait to dig in and figure out how to add effects like this over my 2d content!


It’s super easy. ShaderToy draws a rectangle on the screen and runs the given shader on it. There’s a small amount of plumbing to wire in a few variables like time & mouse position, and your texture coordinates. The rendering part of ShaderToy is simple enough that you can make your own clone in a day. The rest of the site is the hard part, the editor, the API & saving shaders in the cloud, getting lots of people to write awesome shaders, etc., but the rendering part is near trivial.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: