Lighting, texture and displacement mapping in GLSL

Fig 1. A Remote Scene (2021) | Sean Zhai | created with ShaderToy

Modeling with Mathematics

Computer Graphics begin with defining shapes mathematically. Modeling sphere and cube can be solved with ease, but defining real-world objects are challenging. The famous 3D teapot model was created in 1975 by Martin Newell at the University of Utah, and it was featured in many research papers due to the fact that only very limited models were available in the early days of computer graphics.

The alternative of modeling is use polygon meshes to approximating the shape; combining 3D digitizer and scanner, high resolution polygon models are widely used, but often requires long rendering time. …


An introduction to the Jamstack and Headless CMS

Photo by Luis Cortés on Unsplash

From LAMP to JAM stack

According to history.com, the beginning of the Web as a publicly available service on the Internet arrived on August 6, 1991, when Berners-Lee published the first-ever website. The need for the content management system (CMS) soon emerged.

LAMP stack, which stands for Linux, Apache, MySQL, and PHP/Perl/Python, was introduced in 1998, and it was the gold standard of the web at the time and hosted most of the first generation of CMS software.

The most used open-source CMS is WordPress, which stores, manages, and presents the content. …


GLSL Notes in Shadertoy

Photo by Paul Steuber on Unsplash

Why Raymarching

In a virtual 3D scene, imaginary light rays are responsible for generating the pixels in a digital image. The raytracing technique calculates how each light ray meets the surface of an object, the results can be astonishing but finding the precious intersections is computing-intensive and often notoriously slow. The key idea of raymarching is rendering with a point that closes enough to the surface of the object, which is much faster and allows real-time photorealistic rendering with fairly complicated scenes.

To make raymarching effective, a surface is often defined as a signed distance field (SDF). The talented Inigo Quilez proposed…

Sean Zhai

{ coding for something beautiful } algorithmic art, data visualization, aesthetic computing & digital poetry.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store