2 days ago
- Wolfenstein 3D used a Linear Feedback Shift Register (LFSR) to create a fade effect by setting pixels pseudo-randomly until the screen changes color, avoiding slow and visually unpleasant random pixel placement.
- A Feistel Network, typically used in cryptography, offers an invertible transformation for any input, ensuring each pixel position is visited exactly once, making it ideal for replicating the fizzlefade effect at higher resolutions.
- The Feistel network splits a number into two halves, applies non-linear functions over multiple rounds, and recombines them, providing a trivial way to adapt the effect to different resolutions by adjusting bit sizes.
- The author provides a JavaScript implementation using a 16-bit Feistel network for 320x200 resolution, which can be scaled to 20 bits for 1024x768, and notes its broader utility in programming, such as in radix tree tests.