Skip to content

sylefeb/gfxcat

Repository files navigation

A catalog of my old-school GFX effects

Demoparty time!

thumbnails

These are fun and compact graphics effects that I explored as I was developing Silice. Most were implemented directly in hardware, or as risc-v demos for my little CPU cores and SOCs.

This repository contains C versions using a minimalistic framework. They should be very easy to port to run on your own SOC, to port to your own language, or to revisit in hardware (which was the most fun for me :) ).

I list below each effect. You can try them from your browser, as they can all be compiled with Emscripten.

I'll keep expending the list, and if there's interest may do a few deep dives to explain some of them.

I also include in the list pointers to the hardware or risc-v implementations in the Silice repo.

List

  • Run doomfire see code

  • Run msponge see code

    • Silice version is a 300+ stages pipeline racing the beam! No CPU, no framebuffer, see design and demo.
  • Run lotus see code.

    • Silice version runs on a dual-core RV32I risc-v that fits on the icestick! (1.3K LUT), dual-core code and demo.
  • Run starfield see code

    • Another risc-v demo for a tiny SOC, see here. This one is easy to port in hardware, racing the beam, see the snow effect here.
  • Run raytrace see code.

    • A simple (and likely totally incorrect) fixed point 32 bits raytracer! I used this one for a different hardware project, yet to be released, the important point being it does not need floats.
  • Run julia see code

    • Another dual-core risc-v demo for the icestick core, see dual-core code and demo. A fun aspect of that one is that it emulates mul using a lookup table! Yup.
  • Run flyover3d see code.

    • A classic two plane perspective with one division per line. This one races the beam in hardware, see here. The division for the next line happens in parallel to rendering the current line.
  • Run tunnel see code

    • This one was great fun. It is a demo for a more advanced SOC using external QPSRAM, with dual cores capable to independently access fast/slow memory. The video ram is in BRAM and limited in size, hence the 1 bit per pixel output! Because there's ton of slower memory in the SOC however, the demo can use large lookup tables. This was a classic for tunnel effects. See design detailed README here and demo here

Credits

I made all of these effects based on my (not so fresh) memories from my demoscene days, but all are classics and have been shown many times before! Source code includes links to clever tricks by others used in each of the demos (like the neat fractal mul trick and integer sqrt).

About

A catalog of my old-school GFX effects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages