iOS lock step keyboard + metal
This commit is contained in:
@@ -375,6 +375,7 @@ UIRenderer :: struct {
|
||||
u1 := cached.uv_x + cached.uv_w;
|
||||
v1 := cached.uv_y + cached.uv_h;
|
||||
|
||||
|
||||
if self.vertex_count + 6 > MAX_UI_VERTICES {
|
||||
self.flush();
|
||||
}
|
||||
@@ -619,12 +620,7 @@ fragment float4 fmain(VOut in [[stage_in]],
|
||||
// Image mode (mode == -2.0): sample texture
|
||||
return tex.sample(s, in.uv) * in.color;
|
||||
} else if (mode < 0.0) {
|
||||
// Text mode (mode == -1.0): the glyph atlas stores R8 alpha
|
||||
// coverage from stbtt_MakeGlyphBitmap. Use the sampled value
|
||||
// directly as alpha (no smoothstep — those were for SDFs and
|
||||
// thinned anti-aliased coverage strokes). Small-size text renders
|
||||
// dim on dark backgrounds because most glyph pixels sit in 0.1-0.5
|
||||
// coverage; tracked as the "faint text" follow-up.
|
||||
// Text mode (mode == -1.0): the glyph atlas stores R8 alpha coverage.
|
||||
float alpha = tex.sample(s, in.uv).r;
|
||||
return float4(in.color.rgb, in.color.a * alpha);
|
||||
} else if (mode > 0.0 || border > 0.0) {
|
||||
|
||||
Reference in New Issue
Block a user