Comment by nnevatie

20 hours ago

Yes, it’s slop and a bad imitation of the demo scene effects of the time.

The plasma effect, for example, uses vertex shaders to calculate in the order of 8 sines per pixel, and then adds some squares and square roots.

Originally, for a plasma effect, one would calculate a sine based value only for each row and each column. For a 320x240 pixel effect, only 320+240 "complicated" calculations were necessary per frame. To combine these at the pixel level, simple adds and bit shifts were enough. This was necessary, because it was entirely impossible to do so many calculations (or even memory lookups) per pixel on old hardware.

The actual effect is nice, but it has little to do with the old demoscene effect :)

  • I have written many old school plasmas and that does look pretty good to me. Here's one I wrote that looks quite similar https://youtu.be/oX-cepvvQds?t=50 You don't do it once per row or column, and you don't call sine/cosine at all except at init time. You generate lookup tables for cosine, and for each pixel of a (typically mode 13h VGA) 320x200 screen you step through the tables with several counters at different rates and sum the values.

    Here's someone else writing one that also uses that technique https://youtu.be/X6BpW2N_Sf0

    There is an even more oldschool version which was done on XT/286 class machines which was just palette cycling, which didn't look quite as dynamic.