Hacker News new | ask | show | jobs
by ginko 581 days ago
The effect of that is that you're circumventing using hardware specialized for efficient pixel lookup in favor of using general data lookup inside the shader binary. You're saving yourself some memory due to using 1 bit per pixel rather than at least 8 (none of the major APIs expose a 1-bit texture format AFAIK so R8 would be the next best thing), but you're bound to use some extra cycles for the lookup and decoding of your embedded font.
1 comments

> none of the major APIs expose a 1-bit texture format AFAIK so R8 would be the next best thing

I think the next best thing is BC4. The compressed format stores 8 bits/pixels grayscale texture compressed into 8 bytes / 4x4 pixels i.e. 4 bits/pixel, twice smaller compared to R8.

https://learn.microsoft.com/en-us/windows/win32/direct3d10/d...