Hacker News new | ask | show | jobs
by tripzilch 3218 days ago
except the pixels are in a linear framebuffer, the fizzlePixel(x, y) function has a multiplication by 320 in it to calculate the address in the buffer.

so you could skip both the modulo and the mul if you go straight for obtaining a random shuffled framebuffer index.

unless maybe fizzlePixel does additional bookkeeping for some purpose.

1 comments

> has a multiplication by 320

Huh the original implementation seems to have a lookup table instead of that, interesting.

https://github.com/id-Software/wolf3d/blob/05167784ef009d0d0...