Al Green
Al Green's Brother
Home -- News -- Articles -- Books -- Source Code -- Videos -- Xmas -- LinkedIn -- About

The Xmas Demo 2023

Nils Liaaen Corneliusen, Sjur Julin
2023 -- 2022 -- 2021 -- 2020 -- 2017

Click to watch video on YouTube


The Xmas Demo has always been about reproducing computationally intensive graphical effects on cheap low-end hardware. We go to extreme lengths to accomplish this: The optimizations are documented on this website and in chapter 17 of the wildly popular book Real Programming. This plan took a turn for the worse last year when we used an NVidia Jetson AGX Orin Developer Kit []. It's a really expensive embedded device that has the computational power of a PC from... 2016. Oops. The price is slightly lower this year and the hardware hasn't changed, so we decided to reuse it. Thanks, NVidia!

We turned back the clock and thought about how the Xmas Demos from 2017 and 2020 would look on the devkit. An Orin GPU is 8 times more powerful than a TX2 GPU from 2017, so the extra power was spent on making everything look at least 8 times better. As usual, we did a complete redesign and replaced some boring shaders. Sjur's excellent V73D Engine [] is used to control everything. He made a weird looking puzzle box to demonstrate the engine's 3D object capabilities. It's probably not a good idea to open it. The box, that is. Somebody might come.

For once we didn't start producing this piece of crap demo two weeks before Xmas. That means we had time to go overboard with the minutiae. The purpose of it might not be obvious, and it's not supposed to be. It's supposed to make you think and investigate the source code. We also had time to make it all stick together: There's not a single frame out of place. Except the first one. Second, actually. Just like 2017.

All of this is written in the greenest programming languages available: C and GLSL. As documented in the research paper Energy Efficiency across Programming Languages [], Python uses 76 - seventy-six - times more energy than C. To quote the demo: "Save the planet! Write programs in C." It's not a joke. The amount of energy wasted every day by systems written in Python is not huge; it's gargantuan. If you're interested in wasting less energy and writing efficient code, there's a book about that. We already mentioned it. Meanwhile, investments in coal power plants are paying off. The day of reckoning will come eventually.

Sound and Music

Hypnotic Groove [] by Chris Huelsbeck [].
Used under a royalty-free license.

I Got a Stick Feat James Gavins [] by Kevin MacLeod.
Licensed under Creative Commons: By Attribution 4.0 License.

Samples from Hellraiser (1987 film) []

Sound and music mixed by Julin.


Archive: (browse)

data/secret.jpg Secret Frame
data/TheBox.glb The Lament Configuration Julin
data/v73d.png V73D Logo Julin
data/apply.png Apply Yourself Corneliusen
data/chrisl.png Chris (left) Modified by Corneliusen
data/not_sure.png Not Sure Modified by Corneliusen
data/reticle.png Reticle Public domain
data/bigbike.png High Wheeler Public domain
data/mcga.png Make Coding Great Again Julin
data/chrisr.png Chris (right) Modified by Corneliusen
data/check.png Commodore Amiga Logo Public domain
data/cobra_c.png Cobra C Modified by Julin

The Lament Configuration V73D Apply Yourself Chris (left) Not Sure
Reticle High Wheeler Make Coding Great Again Chris (right) Commodore Amiga Logo Cobra C

Source Code

This demo uses the V73D Engine [] by Sjur Julin. It's a pure C/GLSL project with a minimum of dependencies, so it will compile and link with no fuzz. You will need it for building the Xmas Demo yourself. Both V73D and the Xmas Demo runs on Linux and Windows.

An assortment of shaders from ShaderToy [] have been modified and used.

Archive: (browse)

FileBased onAuthorLicenseNotes
src/xmas2023.c Julin & Corneliusen CC0 1.0 Control code
src/vec.h Corneliusen CC0 1.0
shaders/galdance.fs Galactic Dance Sinuousity CC BY-NC-SA 3.0
shaders/rave.fs Rave Lasers R3N CC BY-NC-SA 3.0
shaders/quat.fs Corneliusen CC0 1.0
shaders/twofield.fs Twofield w23 CC BY-NC-SA 3.0
shaders/cyber.fs Cyberpunk City Haru86_ CC BY-NC-SA 3.0
shaders/citywok.fs Procedural City Gr CC BY-NC-SA 3.0
2D Clouds drift CC BY-NC-SA 3.0
shaders/seascape.fs Seascape TDM CC BY-NC-SA 3.0 Includes 2D Clouds
shaders/trans.fs Transparent Lattice Shane CC BY-NC-SA 3.0
shaders/colorful.fs More Colorful Than Average ollj CC BY-NC-SA 3.0
shaders/torus.fs Torus Thingy 1 bal-khan CC BY-NC-SA 3.0
shaders/smoke.fs Lights in Smoke ehj1 CC BY-NC-SA 3.0
shaders/madbulb.fs Mandelbulb Deconstructed morgan3d BSD-2-Clause


We said we would describe the secrets if the YouTube video ever reached 1000 500 400 views. That happened on leap day 2024, so here they are:

The secret message is "27B/6" in "Shine on you crazy mandelbulb". It's explained in the article Brazil (1985 film), subsection 27B/6 []:

The numbering of form 27B/6, without which no work can be done by repairmen of the Department of Central Services, is an allusion to George Orwell's flat at 27B Canonbury Square, London (up six half-flights of stairs), where he lived while writing parts of Nineteen Eighty-Four.

The secret frame is a poorly made collage, mostly to avoid stepping on any copyrights. The main part is a pixelated frame from the end of Raiders of the Lost Ark (1981 film). That Top Men are working on something means it's being buried, stashed away forever. The other parts are from Brazil (1985 film), District 9 (2009 film), 1984 (1984 film), and The Double (2013 film). They all address inefficiencies and half-assed solutions in one way or another. Modern programming is the same: Half-assed inefficient crap that wastes gargantuan amounts of energy.

After the secret frame, "8100000A.48454C50" is spelled out. It's an Amiga guru meditation code: Bogus exception at address 48454C50. A bogus exception is bogus, obviously. 48454C50 is hex ASCII for HELP, meaning that the address cannot be determined. Nifty!

"Prelude" counts down using Roman numerals... until zero. News flash: The Roman numeral system doesn't have a zero value. Modern programming languages seem to hold a grudge against zero. There are no pointers; only references that are really pointers that cannot be zero. Array indexes start from one. The list goes on. CPUs don't work like that. The Roman Empire collapsed. Draw your own conclusion.

The part titles are based on Pink Floyd song titles. Some are simplistic rewrites to fit the theme, some are combinations. There's even a typo... or is it? We try to write US English, so we say nay. The end quote is from "Breathe". We're pretty confident about the wording. The latest remastering is highly recommended: The Dark Side of the Moon: 50th anniversary []

The box might need a bit of explaining. Xmas is a time for gifts. Gifts may be wrapped in boxes. Why is the box in the intro and outro never a gift? Watch Hellraiser (1987 film). This is the yearly Xmas Demo, and we never do Xmassy stuff in them for a reason. Anyway, opening the box has severe consequences. Sort of like trying to solve a problem in a modern programming language and ending up with a barely working piece of crap that depends on hundreds of other pieces of crap written by strangers you decided to blindly trust for no good reason other than pure laziness [1]. Does this sound familiar? Again, watch the film.

The rest of the graphics are from an assortment of films and series: Apply Yourself from Breaking Bad (2008-2013 TV series), Not Sure from Idiocracy (2006 film), High Wheeler from The Prisoner (1967-1968 TV series), Make Coding Great Again [2] from Cobra (1986 film), Cobra C from Cobra Kai (2018- TV series), Checkmark is the (Commodore) Amiga logo, and Reticle is obviously not a bombing reticle at all if you know your reticles. All the mentioned films and series are great. Watch them. Now get bent.


The Box Part 1 Prelude Julia Dream Two Fields in the Sunset Welcome to a New Machine City from The Committee Goodbye Blue Sky Obscured by Glass Set the Controls for the Heart of the Torus Any Color You Like Shine On You Crazy Mandelbulb The Box Part 2 Credits Cobra C


[1] New record: 0x30 words in a sentence without any punctuation. 0x40 will be a hard target.
[2] It has been brought to our attention that "Make something great again" is used as a political slogan in other parts of the world. Talk to the hand.


Technical comments are welcome. Contact information is available here.

If you have a problem with the article text, the video, or the code in any way, please watch this informative video:

YouTube video 9OHm6FsgJM8

Remember to appreciate this SMBC strip titled "Spot On" [].

Article Licensing Information

This article is published under the following license: Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0).
Short summary: You may copy and redistribute the material in any medium or format for any purpose, even commercially. You must give appropriate credit, provide a link to the license, and indicate if changes were made. If you remix, transform, or build upon the material, you may not distribute the modified material.

Ekte Programmering Norwegian flag
American flag Real Programming
Ignorantus AS