This post talks about how to render images like the below in real time using ray tracing. Some realism in the images come from reflection and refraction, but the real icing on the cake comes from Fresnel, total internal reflection … Continue reading

# Category Archives: Shadertoy

Bezier curves are most often talked about either in terms of the De Casteljau algorithm, or in terms of a mathematical function (Bernstein Polynomials). Every now and then though, you see people talking about Bezier curves being calculated via matrices. … Continue reading

This post is an addendum to the last post where I say that you can make distance field textures with JFA but don’t fully explain how to make SIGNED distance field textures, which is what you really want. If you … Continue reading

The image below is called a Voronoi diagram. The circles show you the location of the seeds and the color of each pixel represents the closest seed to that pixel. The value of this diagram is that at any point … Continue reading

Below is a paper I submitted to jcgt.org that unfortunately did not get accepted. Maybe next time! The main idea of this paper is that bilinear interpolation can be equivalent to the De Casteljau algorithm, which means that if you … Continue reading

The other day I had a thought: Rendering smaller than full screen images is super helpful for performance, but upsizing an image results in pretty bad quality vs a full resolution render. What if instead of upsizing the final rendered … Continue reading

My blog posts often serve as “external memory”, allowing me to go back and remember how specific things work months or years after I spent the time to learn about them. So far it’s worked amazingly well! Instead of having … Continue reading

I was working on a Dust Game on shadertoy for a few weeks and got a decent amount of the way through it. Unfortunately I hit a snag. There’s a sad fact that browsers compile WebGL shaders on the main … Continue reading

Shadertoy.com recently added multipass rendering, and one of the founders – iq – introduced the feature to us by (ab)using an off screen texture to store state from previous frames. This was interesting because up until that point, you had … Continue reading