Genuary 6: Raphaël de Courville

January 6, 2022

This is a sketch for Genuary 2022, which provides a creative coding prompt for each day of January. This is day 6: "Trade styles with a friend."

Raphaël de Courville hosts a weekly creative coding challenge, a weekly catalogue of creative coding news, a creative coding Discord community, and he also makes his own code art. Recently he's been making some gemstones, so for this prompt, I tried making some similar gemstones.

This involves creating a 2D moving pattern, and then using it as a texture for each face of the gemstone, with each face having a different texture offset. Raph noticed when developing his original art that using a 2D canvas as a texture for WebGL shapes can be slow in some browsers. For this sketch, I used my p5.Framebuffer library to use a WebGL framebuffer instead of a separate 2D canvas. This way, there is only one WebGL context, and no data needs to be passed to the GPU each frame, as it already has the texture in the same GPU context.