Profiling, timers, compiled code
Optimizing GPU code, as for parallel programming (but worse), is difficult and unintuitive. Several tools can help in this task. Alas, none work in webGL, only on desktop. But you can easily port your...
View ArticleProgramming tricks in Shadertoy / GLSL
Many people start writing GLSL shaders as they would write C/C++ programs, not accounting for the fact that shaders are massively parallel computing + GLSL language offers many useful goodies such as...
View ArticleCase study: making dot pattern loopless
Many beginner tends to program in Shadertoy as they would program in C: by explicitly drawing every elements. But shaders are called for every pixels so drawing the full scene each time can be very...
View ArticleClassical corner cases
Your shader doesn’t work for some other users, or some others don’t get your shader right ? see usual suspects page. You have strange compiling errors, or ultra long compile or run-time, or even...
View ArticleShadertoy media files
Sometime you need to access Shadertoy built-in media (texture, video, music…) out of Shadertoy (e.g., if porting your shader to desktop, or writing a paper or a blogpost about your shader). Here they...
View ArticleWidgets & GUI toolkits (and more)
In their shadertoys, programmers have to handle everything, and redo everything from scratch every time. For repetitive basic utilitary features like GUI or font display it can thus be very boring, so...
View ArticleSimulated computers & languages
Not only some people program whole games in fragments shaders (like Quakes or others), but also some simulate whole computers or programming language interpreters ! For now there are 8 of them: Apple I...
View ArticleAdvanced tricks
Smart antialiasing Antialiasing for free is easy in 2D shaders, as long as you can express shapes as distances: just blur borders over a pixel using smoothstep ( treated here ).But this solution...
View ArticleGalleries and collections
Art reproduction Tag “reproduction” gathers shaders reproducing any kind of art form: famous paintings, photos, drawings, gifs or processing animations, music albums, various tributes , logos, retro...
View ArticlePerformance tricks
[WIP]Many things can impact performances: Choice of algorithm and data structure There often exists more than one way to do one thing, especially in a given situation. → Choose wisely. ( typically in...
View Article