[gpu/demo] Fix blend func for premultiplied paint output

hb_gpu_paint() returns premultiplied RGBA, as documented in
hb-gpu.cc.  The GL demo was using GL_SRC_ALPHA which
double-applied alpha, darkening semi-transparent colors.

Use GL_ONE as the API docs prescribe.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad Esfahbod committed 2026-04-17 03:42:55 -06:00
1 parent af21e3c227
commit 178402d7b4
1 file changed
+1 -1
+1 -1
View File
@@ -47,7 +47,7 @@ demo_glstate_setup (demo_glstate_t *st)
demo_glstate_set_foreground (st, 0.f, 0.f, 0.f, 1.f);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}
demo_atlas_t *