Wikipedia says it well: “Shadertoy.com is an online community and platform for Computer graphics professionals, academics and enthusiasts who share, learn and experiment with rendering techniques and procedural art through GLSL code.”
Now, mentioning code can trigger an automatic negative reaction to the general artist. The difference is that Shadertoy is a gateway to code. Even the rankest beginner is welcome there. In fact, the site is as much of a social site as it is a creative/technical one.
Shadertoy was created by Beautypi (Inigo Quilez and Pol Jeremias) back in 2013. As of mid-2019 there have been over 31,000 public contributions (code) to the site. Here’s a wonderful example:
We were fortunate to have the opportunity to talk to one of the founders of Shadertoy - Inigo Quilez. Here is a brief backgrounder from his personal website:
My name is Inigo Quilez, I was born and grew up in San Sebastián (a.k.a. Donostia), a beautiful city in the Basque Country, in Europe (Spain). I enjoy mathematics, computer graphics and skiing (you can beat me at computer graphics, but not at skiing), among other things. I have a resume, a Shadertoy account, a Youtube channel, a Facebook page, a Twitter stream, a Patreon page where you can help me so I can create more content for this page, and a Redbubble portfolio where you can buy some prints.
Interview with Inigo Quilez
Renderosity Magazine: I noticed in your bio at your website you grew up in San Sebastian. One of my favorite cities in Spain. How has growing up there made a difference in your life as a coder/shader and lover of mathematic
Inigo Quilez: Yes, I grew up in San Sebastian, which is a beautiful city surrounded by beautiful mountains and sea. I’d go skiing every single weekend from November to May for more than a decade (and even compete) so in winter my computer-time was limited to weekdays only, between homework and dinner time. I spent the summers of my youth fishing (boat and shore) and on the beach, so computer time was limited too in summer. I was a late bloomer with computers in a way compared to other kids of the time, but I managed to squeeze some time to learn coding starting at the age of 15.
Soon after that I got obsessed with creating fractals and 3D isometric mountains, certainly influenced by my love for them and nature. So, basically, my life and career paths were already set by the age of 17 or 18, even though I didn’t know it just yet.
You were very active in the demoscene before shader toy: how did you get involved and how did Shadertoy evolve out of the demoscene work you were doing?
Inigo Quilez: The first version of Shadertoy was built in 2009 right when Firefox released its first WebGL implementation. That happened the same year I moved to San Francisco in the US and I got physically disconnected from the parties and events of the demoscene. My last demo was released in 2009 indeed right before flying to the US. Sometime after, in December 2012 I joined forces with my good friend Pol Jeremias to rebuild Shadertoy from scratch. Pol was totally in line and eager to co-own it, and had his own ideas and contributions of his own. Together we learned PHP, CSS, JS and all these Web technologies, and released the site in January 2013.
The whole effort kicked off when I realized that Shadertoy needed to become social like the demoscene, a gathering point not only for demosceners and rendering hackers to learn or show off their skills, but also to share the actual code that they produce. Demosceners are very open to sharing their knowledge through private seminars in the different demo parties, which stay underground mostly like the parties themselves. I thought making the code sharing the central point around which Shadertoy should revolve would make people flock to it. Other attempts to doing this existed though like GLSL Sandbox from our friend Ricardo Cabello, but unlike it, and like in the demoscene, community is key in Shadertoy.
We decided that user names would be attached to each shader, which would help not only get personal feedback on their creations through the comments but more importantly, would allow them to build their reputation as coders and artists, which of course resonates with the personality of the demosceners and most hackers.
So, all in all, Shadertoy was my way to help evolve one part of the demoscene so I’d be convenient for me. Of course, nothing replaces attending demoparties, but we have managed to attract people, students, and academics that usually don’t have enough interest in the demoscene. I feel very good about the “definitely for hackers” but “open and welcoming” balance we’ve found for Shadertoy.
Mathematics can be a struggle for some and yet it seems to come to you second nature. How did you get interested in math and coding? Were you self-taught or trained?
Inigo Quilez: Second question first - I’m both trained and self-taught. I am an Electrical Engineer by training, not a computer scientist or a mathematician. All the maths I studied formally was applied calculus really (that includes things like Fourier analysis and Differential Equations). Anything that has to do with number theory, dynamical systems (chaos theory), combinatorics or algebra that I know is self-taught. Learning for me happens in little bursts when I suddenly find a topic interesting in Youtube/Wikipedia, or when I need some particular piece of maths for one of my paintings. That makes it easy to learn.
But on the flip side, it means that I have a very sparse knowledge that is built on my own intuitions which don’t always match how things actually work necessarily. So actually I know a lot fewer maths than people think, but for the bits I know I do have built strong intuitions that help me operate with them.
The first question next - I think nothing is second nature until you have practiced it enough times. Surely, as a kid, I was in the camp of the lucky ones that found maths easier than history. That together with the principle of laziness - doubling down in the subject you found the easiest, not the ones you find hardest - made me start excelling at maths. Easy maths made me spend more time playing with them, which helped me build intuitions faster, which helped make them feel easier. It’s the classic positive feedback loop that happens when you like something a lot. Soon enough I was working around the teacher’s explanations and finding my own ways of solving certain problems. But it always required me to sit down at home with a sheet of paper and a pencil and solve the maths like you solve sudokus, which I enjoyed a lot. But the understanding never fell from the sky, it was me playing with the maths for long hours.
I suppose not too dissimilar to how a professional pianist finds time to play or practice her scales every day, I still do these maths playing every day. I have my desk full of doodles with new maths equations and I practice almost every day, although most of my little discoveries in computer graphics or maths happen in the shower, when I’m away from real-life duties, I want to relax, and I can think of these things.
Inigo Quilez: “It’s the Youtube of the people that love making graphics, images, and art by coding mathematical formulas and computer algorithms.”
If you don’t know anything about shader technology, then you probably also don’t know what “coding mathematical formulas” and “computer algorithms” mean, so maybe a second attempt would be:
“It’s the Youtube of the technical people in the game development and film industry that create artful imagery by typing mathematics in a computer instead of using brushes or digital sculpting tools”
Did you ever expect Shadertoy to become so popular and active? What are your future ideas for the site?
Inigo Quilez: Pol and I certainly thought there was potential for the site to become what it is today, and that’s why we built it. But we were very aware that just because there’s a need for something it doesn’t mean people will embrace it. But luckily the site took off and a community formed around it rapidly. Today it’s my favorite hobby and source of joy, the thing I check first when I connect online and then check again multiple times per day to see what crazy new procedural algorithm is in there. I can safely assume that many other people do too, and I apologize to the studios whose employees spend too much time in Shadertoy during work hours. On the flip side, better have them check shaders and algorithms than Facebook or Twitter, right?
For the future, Pol and I work on Shadertoy 2 or 3 days a month, usually on Tuesday nights. We have a long, really long, list of things we want to improve and directions we want to go with the site along many different axes. But we have no rush of any type, this is still our pet hobby project.
Some of the shaders at shader toy are inspiring. What learning path would you recommend for someone who is just starting out?
Inigo Quilez: I usually don’t like recommending a particular path because I feel every person operates in different ways. I can describe what worked for me - I taught myself computer graphics by applying it directly in projects I cared about (demos for the demoscene, fractal paintings, shots for a film, educational content). With each project, I learn something, but I always make sure I complete the project. I didn’t block myself looking for perfection - I released my demos, fractal images and paintings no matter what. Of course, there’s a quality bar I like to meet every time, and the bar keeps getting higher, but I am aware the bar takes time to rise and that doesn’t stop me from releasing.
I’ve been doing this for 25+ years and I’m still learning and improving. So, having lots of patience, practicing every day, and completing things worked for me. Also, something very important in my opinion is to make sure you DO reinvent the wheel as many times as needed. I think this is highly important but unfortunately, it seems software engineers are trained to prevent it at all costs. I personally recommend against reusing code, libraries, and techniques too much. Finding your own solutions is, in the worst-case scenario, a way to appreciate how much better the good/professional solutions out there are.
In the best-case scenario, you can find a new algorithm to make something happen, sometimes even something that had never done before. It happens more often than people think in computer graphics, it’s still a green field full of hidden gems. SO, being naive, reinventing the wheel, and exploring new ways of doing old things worked for me as well.
In a non-technical note, striving for prettier art is a good thing. Just because you are a technical artist, a programmer, or an engineer, it doesn’t mean you can't develop an eye to tell the difference between ugly and pretty art. I have seen a lot of people very technically strong who’s work didn’t get the attention it might have deserved just because the results didn’t just look good enough. It costs nothing to learn the very basics, pay attention to films and photography work.
Last question: you mention in your introductory video on your YouTube channel that there are easier ways to create graphic effects; aside from the great fun factor of shader creation, what other benefits does someone get out of shader coding? And can you tell me about your presentation at Siggraph Asia? What do you plan to cover?
Inigo Quilez: I can answer these two together since my talk at Siggraph Asia will exactly that - what other benefits does someone get out of shader coding besides the fun.
Without spoiling the talk too much, I’d say that while I didn’t have an answer to it for many years, after my work at Pixar and Oculus I finally was able to create graphics effects and beautiful content only with mathematics, professionally, make a living of it, and so prove the tremendous practical use of doing images with maths.
Under some conditions, which I’ll describe in the talk, which have to do with the state of the industry and hardware market, there are windows of opportunity for people who are fluent in creating art with maths and code. These windows are wide, provide abundant fun and opportunities, and I suspect happen regularly.
The talk will be about how I operate when those opportunities happen, from a code, math and art perspective - what’s my approach and why I think more people should embrace the same approach to their work.
Editor: Note that the 12th edition of ACM SIGGRAPH Asia will take place from 17 – 20 November 2019 in Brisbane, Australia. Tickets are available to hear from Inigo and numerous other keynote speakers featured session presenters and topical program sessions. Register to attend here: https://sa2019.siggraph.org/registration
Inigo will be presenting at Siggraph Asia in Brisbane, Australia, on Nov 20th, 2019. The title of his keynote is “Why Do I Create Images with Mathematics - A Journey of Innovating in Tech”.