4 ms·
> It's best to render front to back, tracking the highest (in screen space) pixel you have drawn As mentioned in the README of the linked repo: Instead of dra
by scoot 6y ago
> It's best to render front to back, tracking the highest (in screen space) pixel you have drawn
As mentioned in the README of the linked repo:
Instead of drawing from back to the front we can draw from front to back. The advantage is, the we don't have to draw lines to the bottom of the screen every time because of occlusion. However, to guarantee occlusion we need an additional y-buffer. For every column, the highest y position is stored. Because we are drawing from the front to back, the visible part of the next line can only be larger then the highest line previously drawn.