Commit Graph

26 Commits

Author SHA1 Message Date
2da4b7a53d Disable DepthTest when drawing glyphs+move shared glyph draw logic
With depth testing enabled nearby glyphs can z-fight
and so some pixels might be discarded before fragment shader
even runs, which causes us to see only part of a letter.

As such we always draw with blending enabled and depth testing
disabled so that any overlaps simply causes the char pixels to show.
2022-07-08 06:33:20 +04:00
2b71337c4a Remove one pixel offset 2022-07-07 15:38:06 +04:00
16bfe7f05b Use per-char width instead of fixed advance in font atlas
This gives us more (much?) efficient packing of letters
and we load exact size of the letters.

It looks visually a lot better too!
This wasn't good with normal smapling, but using texelFetch its
great.
2022-07-07 15:33:51 +04:00
d23e833b54 Use texelFetch+debug grid in atlas 2022-07-06 17:53:55 +04:00
afcd514f98 Proper runs and glyph shaping. Arabic rendering properly! 2022-07-05 10:42:51 +04:00
ec07b8a256 Parse arabic-shaping for join type information 2022-07-05 08:56:49 +04:00
0368ee9caf Alhamdullah basic arabic rendering :D 2022-07-05 08:20:45 +04:00
ed1ec0d67e Basic run extraction 2022-07-05 07:29:33 +04:00
603409e58e Detect script of runes 2022-07-05 07:12:11 +04:00
c40d1dfdf1 Fix decoding decomp info+include rune equivalence 2022-07-05 06:39:32 +04:00
a762283b1d Alhamdullah start proper unicode support+context aware rendering 2022-07-04 10:16:03 +04:00
0ff7f051f6 Handle tabs 2022-07-04 02:45:59 +04:00
3d7d09744d Don't allocate when drawing by reusing glyp rend buffer 2022-07-04 01:10:37 +04:00
edd8d5b71b Remove commented out code 2022-07-03 22:37:22 +04:00
115310cff7 Use vec2 for glyph model scale 2022-07-03 22:18:37 +04:00
afb5453a3a Make SizeU/SizeV uniforms instead of per-vertex+reduce glyph info 2022-07-03 22:08:40 +04:00
9c09814322 Nice fonts without bleeding at all sizes using tiled atlas 2022-07-03 12:27:16 +04:00
a4b7dfd395 Update texture atlas straight from memory 2022-07-03 09:22:51 +04:00
323cd1099f Move to latest nMage 2022-07-03 09:17:59 +04:00
701ee97c66 Reduce padding 4->2 2022-07-02 10:15:53 +04:00
56a6e0868b Pad font atlas to avoid bleeding+togglable grid 2022-07-02 09:03:54 +04:00
ad759e03fc Respect bearing,scaling and other metrics 2022-07-02 07:11:40 +04:00
7a3ce51063 Fix bug with atlas texture not being updated on GPU 2022-07-01 11:27:37 +04:00
094cc1acdd Take normalized coords in DrawTextOpenGL 2022-07-01 10:43:45 +04:00
0d2792c82e Improve glyph API 2022-07-01 10:33:37 +04:00
224f33bf9f Abstract glyph renderer 2022-07-01 10:20:30 +04:00