mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 06:28:20 +00:00
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:
@ -46,7 +46,7 @@ uniform sampler2D diffTex;
|
||||
void main()
|
||||
{
|
||||
vec4 texColor = texelFetch(diffTex, ivec2(v2fUV0), 0);
|
||||
// vec4 texColor = texture(diffTex, v2fUV0);
|
||||
// This commented out part highlights the full region of the char
|
||||
// if (texColor.r == 0)
|
||||
// {
|
||||
// fragColor = vec4(0,1,0,0.25);
|
||||
|
||||
Reference in New Issue
Block a user