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

The Xmas Demo 2020

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

Click to watch video on YouTube

Introduction

Long story short: We took the old Xmas Demo 2017, fixed a busload of bugs, and replaced the music, the pictures, and the fonts.

To recap: The OpenGL shaders, most of them from shadertoy.com, were optimized and rewritten specifically to run in 60 fps on the cute NVidia Tegra X2 GPU back in 2017. They were kept pretty much as is but are no longer dependent on NVidia-specific shader features.

Shader changes are documented in chapter 17 of the book Real Programming.

Source Code

Make sure your screen is set up to 1920x1080 (or larger) in 60 fps.

Windows: Tested with Visual Studio Community 2019, but you have to figure out how to include libpng, libmikmod, and OpenGL. One day the NuGet package manager will be useful. Today was not that day.

Linux: The super-simple makefile should work on any target. It needs the usual OpenGL packages and libmikmod and libpng. All the cool kids have those installed already.

Tested on the Jetson AGX Xavier Developer Kit. Works perfectly, but it's necessary to lock the GPU clock to max speed. The auto speed crap just isn't quick enough.

Also tested on an assortment of random NVidia and AMD graphics cards. Seemed to work ok.

Versions:
v5 2021-03-03: Linux window size, vsync, music, and key handling fix.
v4 2021-02-02: Improve tracer GLSL probe lookup code
v3 2021-01-30: Fix remaining font issues, use libpng instead of libjpeg
v2 2021-01-02: Fix some font rendering issues, add Linux support
v1 2020-12-23: Initial Release

Artwork

The picture called Mega Monitor is made by Sjur Julin. License: CC0 1.0

The music called Mad Dubs Xmas is made by Sjur Julin. License: CC0 1.0

Secrets

Hidden logo

The lower right corner of the monitor picture has a secret logo, enhanced in red above. It's from the article When corporate signage goes BAD [theregister.com]. Who took the picture? Very few know the truth. It was hilarious, though.

The text "SrDt 3454" appears in Torus Thingy. It's a reference to "The Great Ventilation and Telephone Riots of SRDT 3454" described in the awesomely awesome book "trilogy" The Hitchhiker's Guide to the Galaxy [wikipedia.org].

Snapshots

The Xmas Demo 2020 Intro The Xmas Demo 2020 Galactic Dance The Xmas Demo 2020 Glow City The Xmas Demo 2020 Raytracer The Xmas Demo 2020 Noise 3D Fly Through The Xmas Demo 2020 Julia Quaternions The Xmas Demo 2020 More Colorful Than Average The Xmas Demo 2020 Seascape The Xmas Demo 2020 Transparent Blobs The Xmas Demo 2020 Twofield The Xmas Demo 2020 Torus Thingy The Xmas Demo 2020 End

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