raddebugger
raddebugger copied to clipboard
Reduce pixel overdraw while rendering text
There are two small changes here to reduce overdraw. The first one stores the more compact rectangle as the glyph subrect to prevent drawing the entire atlas cell. The second one detects bitmaps that are empty and doesn't allocate any atlas region for it. This prevents the space character from being drawn by d_img.
The first image here shows the reduced wireframe sizes for the new version (on the right). The second image is the amount of overdraw for the render pass. Purple, blue, and green are low overdraw while yellow, red, and white are significant overdraw.
This should reduce the GPU load, which is significant on my laptop with an integrated video card.