Scanline Rendering
2019-2020
This hardware design draw rectangles shaded into ellipsis. Pixels are produced in sync with the video signal eliminating the need for a frame buffer. This means a pixel needs to be fully resolved and drawn at once to be fed to TMDS encoders and serialized to HDMI. By design a constant predictable frame rate are achieved and no frames are lost.
Objects are represented by a rectangle AABB that is shaded to control its shape and color. The shaded value in each pixel is represented by a local polynomial, s = Ax2 + By2 + Cxy + Dx + Ey + F. s is then clamped to an alpha value between 0 and 255 that is used to blend a color into the background. Picking the parameters A-F can draw rectangles, gradients, circles, rotated ellipsis. Altering the range the edges of circles and ellipsis can have smooth edges.
In order to draw multiple objects with one shared shape hardware instance, objects need to be scheduled in the correct order within each scanline. Objects that overlap must be discarded or delegated to another hardware instance to avoid stalling the object stream.
The material on this page are from low resolution HDL simulations but have all been verified in 720p60 on an Arty-Z7 board resulting in a pixel clock of 74 MHz.