1. The long journey to 1k real-time ray-tracing
  2. Making of the visual
  3. Making of the music (part1) by ern0
  4. Making of the music (part2) by TomCat
  5. Download page and source code

The long journey to the birth of Chrome Revenge

The many little steps until the real-time ray-tracing dream came true

PENTRACE

It started in 1994, when I read some interesting articles in Dr. Dobbs Journal about the new Pentium processor's FPU. I came to understand that numeric performace of the Pentium is very sensitive as to the use and ordering of FPU instructions, and with adding some extra FXCH instructions we can significantly boost up the running speed.

At that time, if we wanted to raytrace a scene, it took hours or days to get the picture. I decided to write a raytracer, which is similar to POV-Ray or BOB but in Assembly, and the code would be heavily optimized to the Pentium FPU. That was "Pentrace", my diploma thesis at the college.

CHROME

There was a very-well known and popular ray traced animation called Chrome, it has spread among Amiga users primarily. I thought it will be so cool to show the same animation to the audience at the Assembly demoparty but in 4 kb only!

The Chrome 4kb intro finished fourth out of 44 entries in 1995.

CHROME 2

While Chrome was finished at the party just before the deadline, next year I was the *first* one to toss the floppy disk into the entry collection box. This intro was the first product with a real-time ray-tracing part, but in very low resolution, 144x102 pixels only.

However, I went there to win :-) But the intro wasn't shown at the compo :-( because, unfortunately, the organizers lost my entry, and the intro was shown just later between two compo blocks.

After all the Chrome2 4kb intro finished fifth in 1996, but in the next week this product had topped the Hornet Archive's downloading chart.

CODER-L

I was operating a very successful Hungarian mailing list for coders till 2001. On this CODER-L list, there were lot of discussions about the theoretical possibilities of real-time ray-tracing.

Later such productions appeared on the basis of this, like Slumpism by Pathos. (while tracing eye-rays, it did an eyeplane-object intersection test before every scanline), or Heaven Seven by Exceed (used adaptive sub-sampling for eye-rays).

But meanwhile, in the late 90s, I lost my interest in, and motivation for, the demoscene... :-(

COLORFUL

My comeback was in 2016 at qbparty. I was amazed that there was still room for DOS Assembly coding in the demoscene, so I started to publish 256 byte intros.

But the hardware environment has changed a lot since back then, and after testing many modern computers, I realized that the only option for a ray-tracer is 640x480@32bit video mode (with banked memory).

My first HiRes 256b intro was Colorful (finished 2nd at Function 2016).

256B SEMINAR

In 2017 at Function I presented my ray-tracing engine with some pokeballs. It used adaptive sub-sampling but only in horizontal direction, because of the awkward bank switching of video memory. And yes, it was quite fast.

SEASHELL

First time I was using orthogonal projection for eye-rays. It looked good enough and it was fast and very small in terms of code size.

Seashell 256b intro finished 1st at Riverwash in 2017.

TCTRONIC

We broke the compo rules at Function 2017. Our intro had PWM PC-Speaker music and played a well known bytebeat.

TCTRONIC 256b intro finished 2nd at Function demoparty.

Plasmifier Cover 256b

The first 256b intro which has softsynth music rather than a simple bytebeat.

Plasmifier Cover finished 2nd at Chaos Constructions in 2018.

Thanks to Provod and Frag for showing the cheap IMUL xx,xx,-1 envelope on the ikubun stream. And thanks to Gargaj for drawing attention to mastering in his speech at Assembly.

Balls Harmony

HellMood opened an interesting topic about write combining, which could speed up writing to video memory. Especially true color intros took benefit of this.

With write combining, I was able to trace every pixel of the screen in my intro (however, it did not run in an emulator that way).

Balls Harmony 256b intro finished 2nd in 2019 at Function.

SSE 4.1

With Kuemmel we started to codegolf the Function entry of Frigo (Space Fungus). We were trying to speed it up with SSE instructions. And writing to the video memory by a MOVAPS [ES:DI],XMM7 was even faster than the write combine thing.

Also, Kuemmel was informed by the Tiny Intro Toolbox thread how easy it was to clamp color values using SSE instructions.

Once I mentioned (reflecting to my Sizecoding Blog), that SSE is so cool, you can normalize vectors without SQRT & DIV :)


After all this history, I wrote my own SSE ray-tracer at end of the year 2019.
Read further the Making of CHROME REVENGE