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.
This commit is contained in:
bloeys
2022-07-08 06:33:20 +04:00
parent 2b71337c4a
commit 2da4b7a53d
5 changed files with 101 additions and 166 deletions

6
go.mod
View File

@ -7,11 +7,9 @@ require (
github.com/bloeys/nmage v0.12.13
github.com/go-gl/gl v0.0.0-20211025173605-bda47ffaa784
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/inkyblackness/imgui-go/v4 v4.3.0
github.com/veandco/go-sdl2 v0.4.10
golang.org/x/image v0.0.0-20220617043117-41969df76e82
)
require (
github.com/bloeys/assimp-go v0.4.2 // indirect
github.com/inkyblackness/imgui-go/v4 v4.3.0 // indirect
)
require github.com/bloeys/assimp-go v0.4.2 // indirect